Authentication and scopes
Personal access tokens, what each scope allows, and how send approval keeps you in charge.
Personal access tokens
Every request sends a token in the Authorization header:
Header
Authorization: Bearer dl_pat_…Create tokens in the app under Settings → Connect AI agents. The full token is shown once; we only store a keyed hash of it. Tokens made before the rename start with cm_pat_ and still work.
Each token has:
- a name, so you know what it’s for;
- scopes: what it may do;
- mailboxes it may use;
- an expiry: 90 days by default, up to 365, or none;
- an optional IP allow-list;
- send approval, on by default.
Revoking a token stops it at once. Expired or revoked tokens, and tokens of suspended accounts, get 401.
Scopes
| Scope | Allows |
|---|---|
mail.read | List mailboxes, folders and usage; list, search and read messages; download originals and attachments. |
mail.draft | Create drafts; reply with draft_only: true. |
mail.organize | Mark read or unread, star or unstar, move to inbox, archive, junk or trash. |
mail.send | Send and reply. Paid plans only. Subject to send approval. |
domains.read | List your own domains and their DNS status. |
webhooks.manage | Create, change, test and delete webhooks; read deliveries. |
A missing scope returns 403 insufficient_scope. A mailbox the token wasn’t given returns 404: we don’t reveal whether it exists.
Send approval
Send approval is on by default for every token with mail.send. A send then returns 202 and nothing goes out until you press Send on the card that appears above your message list:
Response
{ "status": "pending_approval", "id": "<approval id>" }- Approvals expire after 24 hours.
- Poll
GET /approvals/{id}, or listen for theapproval.requestedwebhook. - You can turn approval off per token.