Skip to main content
POST
Connect Email Provider (Initiate OAuth)

Authorizations

x-api-key
string
header
required

Your API key for authentication. Use sandbox-with-json-responses as Sandbox key.

Body

application/json
redirect_uri
string<uri>
required

Your callback URL to receive the inbox_token (must be http or https)

Example:

"https://yourapp.com/oauth-callback"

state
string

State parameter for CSRF protection (returned in redirect)

Example:

"abc123"

provider
enum<string>
default:gmail

Mail provider to connect. Defaults to gmail.

  • gmail - Google accounts: @gmail.com and Google Workspace domains.
  • outlook - personal Microsoft accounts: @outlook.com, @hotmail.com, @live.com, @msn.com and localised variants (@hotmail.co.uk, @live.in, @hotmail.fr). Any other address registered as a personal Microsoft account also works, including custom domains.
  • zoho - Zoho Mail accounts, including custom domains hosted on Zoho.

Any unrecognised value is treated as gmail. The resolved provider is returned in the response.

Available options:
gmail,
outlook,
zoho
Example:

"outlook"

Response

OAuth URL generated successfully

status
string
Example:

"success"

oauth_url
string<uri>

Redirect user to this URL to start OAuth flow

Example:

"https://accounts.google.com/o/oauth2/v2/auth?client_id=..."

provider
enum<string>

The provider this OAuth URL was generated for

Available options:
gmail,
outlook,
zoho
Example:

"outlook"

expires_in
integer

Seconds until the OAuth URL expires (typically 10 minutes)

Example:

600