MailboxesForwarding, DMARC and OAuth

Grant an OAuth client ID

POST
/v1/mailbox-domains/{id}/client-ids

Trusts your app's Google OAuth client on the domain's Google account, so its mailboxes can sign in to it. delegated: true grants domain-wide delegation for scopes instead, so the app can act as any mailbox on the domain without each one signing in. Needs the domain’s admin mailbox set up. We follow the request and send client_id.completed or client_id.failed.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from the Developers page. rhq_test_ keys reach the sandbox, rhq_live_ keys the live side.

Path Parameters

id*string

Request Body

application/json
  1. body
clientId*string
Length6 <= length <= 200
delegated?boolean
scopes?array<string>

Full scope URLs, for a delegated client only

Itemsitems <= 50

Response Body

Created

application/json
  1. response

Created

id*string
mailboxDomainId*string
clientId*string
delegated*boolean

True for domain-wide delegation, false for a trusted app

scopes*array<string>
status*string
Value in"pending""completed""failed"
error*string|null
completedAt*|null
createdAt*string
Formatdate-time
curl -X POST "https://example.com/v1/mailbox-domains/mdm_01K6XJ4Q8ZT3M9R5V2B7WDHNCA/client-ids" \  -H "Content-Type: application/json" \  -d '{    "clientId": "102938475610293847561"  }'
{  "id": "cid_01K6XJ4Q8ZT3M9R5V2B7WDHNCA",  "mailboxDomainId": "mdm_01K6XJ4Q8ZT3M9R5V2B7WDHNCA",  "clientId": "102938475610293847561",  "delegated": true,  "scopes": [    "string"  ],  "status": "pending",  "error": "string",  "completedAt": "2026-10-07T11:04:31.000Z",  "createdAt": "2026-10-07T11:04:31.000Z"}