Skip to main content

Add Microsoft mailboxes in bulk

Connect one or more Microsoft mailboxes with Microsoft Graph app-only authentication. Use a credential_id from List credentials, or omit it only when your account has exactly one valid Microsoft Graph credential.

Request

Endpoint

POST https://api.woodpecker.co/rest/v2/mailboxes/microsoft/bulk

Headers

x-api-key: {YOUR_API_KEY}
Content-Type: application/json

For details on how to authenticate your requests, please see the authentication guide.

Body

{
"auth_type": "APP_ONLY",
"credential_id": 22334455,
"accounts": [
{
"mailbox_email": "jim@example.com",
"display_name": "Jimothy H"
},
{
"mailbox_email": "michael@example.com",
"display_name": "Michael Scarn"
}
]
}

Body schema

FieldTypeRequiredDescription
auth_typestringNoAuthentication type. Defaults to APP_ONLY; only APP_ONLY is supported
credential_idintegerNoMicrosoft Graph credential ID. Can be ommited only when your account has exactly one valid Microsoft Graph credential
accountsarrayYesMicrosoft mailboxes to connect
  └─mailbox_emailstringYesMailbox email address
  └─display_namestringNoDisplay name used for the mailbox

Request samples

Connect Microsoft mailboxes

curl --request POST \
--url "https://api.woodpecker.co/rest/v2/mailboxes/microsoft/bulk" \
--header "x-api-key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"auth_type": "APP_ONLY",
"credential_id": 22334455,
"accounts": [
{
"mailbox_email": "jim@example.com",
"display_name": "Jimothy H"
},
{
"mailbox_email": "michael@example.com",
"display_name": "Michael Scarn"
}
]
}'

Response

Response examples

All submitted mailboxes were connected.

[
{
"success": true,
"id": 444444,
"email": "jim@example.com",
"name": "Jimothy H",
"deliverability": {
"spf_correct": true,
"dkim_correct": true
},
"error": null
}
]

Body schema

FieldTypeDescription
successbooleanWhether the mailbox was connected
idintegerConnected mailbox ID
emailstringMailbox email address
namestring/nullMailbox display name
deliverabilityobjectDeliverability check result
  └─spf_correctbooleanWhether SPF is configured correctly
  └─dkim_correctbooleanWhether DKIM is configured correctly
errorstring/nullPer-mailbox error code