POST /mailboxes/oauth to export an existing mailbox| Provider | Identifier | Required Fields |
|---|---|---|
GOOGLE | google.googleOauthRoute, google.clientId, google.appName | |
| Microsoft | MICROSOFT | microsoftOauthRoute |
| Method | Endpoint | Description |
|---|---|---|
POST | /mailboxes/oauth | Queue OAuth export for an existing mailbox |
POST | /domains/add-client-id | Attach a third-party OAuth client ID to domains |
google object in your POST /orders/json?userId= payload alongside the domain and mailbox details.mailbox.created — mailboxes are exported to the platform as part of provisioning.POST /mailboxes/validate-mailbox?userId= — confirm SMTP and DNS are healthy before exporting.POST /mailboxes/oauth?userId= — pass mailboxId and the google config object.POST /mailboxes/validate-mailbox?userId= — confirm the mailbox is healthy.POST /mailboxes/oauth?userId= — pass mailboxId and microsoftOauthRoute.POST /domains/add-client-id — pass userId, domains array, clientId, and app name. The client ID is validated before queuing.| Code | Scenario |
|---|---|
400 | Missing required fields, invalid request format, or client ID validation failed |
401 | Missing or invalid API key / userId |
403 | Mailbox or domain does not belong to this user |
404 | Mailbox or domain not found |
500 | Provider connection error (retry safe) |
serviceProvider, not the request. Sending a google object for a Microsoft mailbox (or vice versa) will cause the export to fail.POST /mailboxes/validate-mailbox first. Exporting a misconfigured mailbox causes silent failures on the receiving platform.200 response only confirms the job was queued. Allow time for the OAuth handshake to complete before expecting credentials on the platform.POST /domains/add-client-id validates the client ID live before queuing. Ensure the app name exactly matches the registered app name for the client ID.