v13

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-022830130.4 KB
Email Import

Connect Email Provider (Initiate OAuth)

Initiate OAuth flow to connect user's email inbox.

Returns an oauth_url that you should redirect the user to. After authorization, they are redirected back to your redirect_uri with the following query parameters:

On success:

  • inbox_token - Encrypted token to store client-side
  • email - Email address of the connected account
  • state - Your original state parameter (for CSRF verification)

On error:

  • error - Error code (e.g., access_denied, token_exchange_failed)
  • state - Your original state parameter

Store the inbox_token client-side and use it for all subsequent inbox API calls.

post/v4/inbox/connect

Request body

redirect_uristring uri required

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

statestring

State parameter for CSRF protection (returned in redirect)

Example request

{
  "redirect_uri": "https://yourapp.com/oauth-callback",
  "state": "abc123"
}

Response

OAuth URL generated successfully

statusstring
oauth_urlstring uri

Redirect user to this URL to start OAuth flow

expires_ininteger

Seconds until the OAuth URL expires (typically 10 minutes)

Example response

{
  "status": "success",
  "oauth_url": "https://accounts.google.com/o/oauth2/v2/auth?client_id=...",
  "expires_in": 600
}