1. Core Concepts
  • Welcome to the Cold Mail Reseller API
  • Get Started
    • Overview
    • Authentication
    • Quick Start
  • Core Concepts
    • Users
    • Domains
    • DNS Management
    • Mailboxes
    • Subscriptions
    • Pre-Warmup
    • Domain Renewal
    • 1+ Year Subscriptions
    • Mailbox Warmup
    • Platform Exports
    • OAuth Exports
    • Sandbox API
  • API Reference
    • Users
      • List Users
      • Get User
      • Create User
      • Update User
      • Delete User
    • Geo
      • List Countries
      • List States
    • Domains
      • Domain Renewal
        • Get Domain Renewal Prices
        • Renew Domains
        • Toggle Domain Auto-Renew
      • Get Domains by User
      • Check Domain Availability
      • Check Single Domain Availability
      • Check Workspace Existence
      • Set Domain Forwarding
      • Set Email Forwarding
      • Delete Domains
    • DNS
      • Get DNS Records
      • Add DNS Records
      • Update DNS Record
      • Update Nameservers
      • Delete DNS Record
    • Mailboxes
      • List Mailboxes
      • Get Mailboxes by User
      • Get Mailbox
      • Get Admin Mailbox Details
      • Update Mailbox Details
      • Delete Mailbox
    • Mailbox Warmup
      • Add Warmup to Mailbox
      • Toggle Warmup
      • Update Warmup Settings
      • Set Warmup Status
      • Disable Warmup
    • Orders
      • Get Order Status
      • Get Order Details
      • Create Order
      • Create Order (JSON)
      • Create Mailbox Order (JSON)
      • Process Order
    • Subscriptions
      • 1+ Year Subscription
        • Recreate Subscription
      • Get Subscriptions
      • Renew Subscriptions
      • Cancel Subscription
      • Toggle Auto-Renewal
    • Exports
      • Platform Exports
        • Get Platform Credentials
        • Add Platform Credential
        • Export Mailboxes to Platform
        • Remove Platform Credential
      • OAuth Exports
        • Perform OAuth
        • Add Client ID to Domains
    • Pre-Warmup
      • Sandbox
        • Get Sandbox Pre-warmup Domains
        • Order Sandbox Pre-warmup
        • Reset Sandbox Pre-warmup
      • Get Pre-warmup Domains
      • Order Pre-warmup
    • Placement Test
      • Create Placement Order
      • Get Placement Reports
  • Resources
    • Errors
    • Rate Limits
    • Pagination
    • Sandbox
    • MCP
  • Webhooks
    • Overview
    • Events
      • Domain Events
      • Mailbox Events
      • Subscription Events
      • Prewarmup Events
      • Mailbox Warmup Events
  • Schemas
    • Error
    • Success
    • MessageResponse
    • User
    • Domain
    • ErrorResponse
    • Mailbox
    • Subscription
    • DnsRecord
    • Error Response
    • Pagination Meta
    • Action Error Response
    • PrewarmupOrderResult
    • OrderCreationResult
  1. Core Concepts

OAuth Exports

The OAuth Exports API lets you export mailbox credentials to sending platforms using Google or Microsoft OAuth — without handling passwords directly.
OAuth can be configured at three points in the lifecycle:
At order time — include OAuth config in the order payload so mailboxes are exported immediately on provisioning
Post-provisioning — call POST /mailboxes/oauth to export an existing mailbox
Via domain client ID — attach a third-party OAuth client ID to domains so all mailboxes on those domains can be exported to platforms like Reachinbox or Smartlead

Supported Providers#

ProviderIdentifierRequired Fields
GoogleGOOGLEgoogle.googleOauthRoute, google.clientId, google.appName
MicrosoftMICROSOFTmicrosoftOauthRoute

Available Endpoints#

MethodEndpointDescription
POST/mailboxes/oauthQueue OAuth export for an existing mailbox
POST/domains/add-client-idAttach a third-party OAuth client ID to domains

Key Concepts#

OAuth at order time
OAuth for existing mailboxes
Google OAuth config
Microsoft OAuth config
Domain client ID attachment
Async behavior

Scenarios#

Export at Order Time (Google)#

1
Place order with OAuth config
Include the google object in your POST /orders/json?userId= payload alongside the domain and mailbox details.
2
Receive webhook
Listen for mailbox.created — mailboxes are exported to the platform as part of provisioning.

Export an Existing Mailbox (Google)#

1
Validate the mailbox
POST /mailboxes/validate-mailbox?userId= — confirm SMTP and DNS are healthy before exporting.
2
Queue OAuth export
POST /mailboxes/oauth?userId= — pass mailboxId and the google config object.
3
Confirm export
Check your connected platform or listen for export completion on the platform side.

Export an Existing Mailbox (Microsoft)#

1
Validate the mailbox
POST /mailboxes/validate-mailbox?userId= — confirm the mailbox is healthy.
2
Queue OAuth export
POST /mailboxes/oauth?userId= — pass mailboxId and microsoftOauthRoute.
3
Confirm export
Check your connected platform or listen for export completion on the platform side.

Attach Client ID to Domains#

1
Attach client ID
POST /domains/add-client-id — pass userId, domains array, clientId, and app name. The client ID is validated before queuing.
2
Export mailboxes
Once attached, mailboxes on those domains can be exported to the platform using the client ID for SMTP/IMAP access.

Error Codes Reference#

CodeScenario
400Missing required fields, invalid request format, or client ID validation failed
401Missing or invalid API key / userId
403Mailbox or domain does not belong to this user
404Mailbox or domain not found
500Provider connection error (retry safe)

Avoid These Common Issues#

Wrong provider config — The provider is determined by the mailbox's serviceProvider, not the request. Sending a google object for a Microsoft mailbox (or vice versa) will cause the export to fail.
Exporting before validating — Always call POST /mailboxes/validate-mailbox first. Exporting a misconfigured mailbox causes silent failures on the receiving platform.
Assuming immediate completion — A 200 response only confirms the job was queued. Allow time for the OAuth handshake to complete before expecting credentials on the platform.
Re-submitting in-progress exports — Do not re-queue an export if one is already in progress. Check the platform side before submitting again.
Invalid client ID — 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.

Next Steps#

Platform Exports
Export mailboxes to EmailBison using stored platform credentials.
Mailboxes
Validate and manage mailboxes before exporting.
Mailbox Warmup
Complete warmup before exporting to a sending platform.
Modified at 2026-08-05 16:12:50
Previous
Platform Exports
Next
Sandbox API
Built with