Email Accounts

Start OAuth connect

Start connecting a Google Workspace or Microsoft mailbox over OAuth. Returns a consent URL to open in a browser, plus a state handle. Once the owner grants access, poll GET /v1/accounts/oauth/{provider}/status?state=….

Requires one of the following scopes: accounts:write, accounts:all, all:all.

post/v1/accounts/oauth/{provider}/init

Request

  • Base URL: https://api.mailbeast.ai
  • URL: https://api.mailbeast.ai/v1/accounts/oauth/{provider}/init
  • Auth: HTTP bearer

Path parameters

provider'google' | 'microsoft' required

Response

authorizationUrlstring required

Open this consent URL in a browser so the mailbox owner can grant access.

statestring required

Opaque handle. Pass it to the status endpoint to poll the result.

expiresInSecondsnumber required

How long the consent link / state stays valid.

Example response

{
  "authorizationUrl": "https://accounts.google.com/o/oauth2/v2/auth?client_id=…&state=…",
  "state": "aB3dEf6hIjKlMnOpQrStUvWxYz0123456789_-AbCdE",
  "expiresInSeconds": 600
}

Changes

No recorded changes to this operation across all 1 revision of this API.