MailboxesForwarding, DMARC and OAuth
Grant an OAuth client ID
POST
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.
apiKeyheader
AuthorizationBearer <token>An API key from the Developers page. rhq_test_ keys reach the sandbox, rhq_live_ keys the live side.
id*stringapplication/json- body
clientId*stringLength
6 <= length <= 200delegated?booleanscopes?array<string>Full scope URLs, for a delegated client only
Items
items <= 50Created
application/json- response
Created
id*stringmailboxDomainId*stringclientId*stringdelegated*booleanTrue for domain-wide delegation, false for a trusted app
scopes*array<string>status*stringValue in
"pending""completed""failed"error*string|nullcompletedAt*|nullcreatedAt*stringFormat
date-timecurl -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"}