Inboxes
Add an inbox
Registers a new inbox. It starts with no credential. The person connects it on the website.
A new inbox has needsReconnect: true and a reconnectUrl. Send the person to that link to sign in. The API never charges: when a paid slot is needed, it returns 402 with approveUrl for the person.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization |
string | Required | Bearer followed by your API key. |
Content-Type |
string | Required | application/json |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
label |
string | Required | Display name, like "Work Gmail". |
email |
string | Required | The mailbox address. |
provider |
string | Optional | google, microsoft, icloud, or imap. Detected from the address when left out. Custom domains default to imap. |
Response
201 Created. Returns inbox object.
| Name | Type | Description |
|---|---|---|
id |
string | Inbox id. |
label |
string | Display name, like "Work". |
provider |
string | google, microsoft, icloud, or imap. |
email |
string | The mailbox address. |
folders |
string[] | Folders that sync. Defaults to Inbox, Sent, and Drafts. |
status |
string | Last recorded state: pending_credentials, connected, demo, or error. Can lag. Trust connectionStatus and needsReconnect instead. |
connectionStatus |
string | credentials_present when a credential is stored, or blocked_on_secret when the person still has to connect. |
needsReconnect |
boolean | true when the person has to connect or reconnect the inbox before it can sync. |
sayToHuman |
string | Only when needsReconnect is true. A sentence to show the person. |
reconnectUrl |
string | Only when needsReconnect is true. Give this link to the person. |
lastSyncedAt |
string | null | ISO time of the last finished sync. |
lastError |
string | null | The last sync error, if any. |
createdAt |
string | ISO time the inbox was added. |
Errors
| Status | Error | Meaning |
|---|---|---|
| 400 | invalid_request |
label or email is missing. |
| 402 | upgrade_required or approval_required |
The plan needs an upgrade or a paid slot. approveUrl, when present, is a link for the person. |
| 403 | email_not_verified |
The person has not confirmed their email address. |
| 403 | inbox_limit |
The plan is at its inbox limit. |
Any route can also return 401 for a bad key, 402 when the trial ended or payment failed, and 429 when you send too many requests. See Errors.