Skip to main content
POST

Authorizations

X-API-KEY
string
header
required

Your access token, from your dashboard under API keys.

Body

application/json
provider
enum<string>
required

imap: Gmail, Google Workspace and every other provider through IMAP/SMTP.

Available options:
imap
account_id
string

Reconnect this account.

state
string

Sent back in the redirect and the account.add / account.reconnect event.

email
string<email>

IMAP: the mailbox's address (defaults to imap_user).

name
string

IMAP: display name.

password
string

IMAP: one password for IMAP and SMTP.

imap_host
string

Filled in from the address for Gmail, Yahoo, iCloud, AOL, Zoho, GMX and Fastmail; otherwise required.

imap_port
integer

993 (SSL) or 143 (STARTTLS).

imap_user
string
imap_password
string
imap_encryption
enum<string>
Available options:
SSL,
STARTTLS,
NONE
smtp_host
string
smtp_port
integer

465 (SSL), 587 (STARTTLS) or 25.

smtp_user
string
smtp_password
string
smtp_encryption
enum<string>
Available options:
SSL,
STARTTLS,
NONE
smtp_save_to_sent
boolean
default:true
connection_params
object

The same IMAP/SMTP settings

config
object

One provider's initial sync settings.

Response

Reconnect: the account with its new settings.

object
string
Allowed value: "Account"
id
string

acc_…

user_id
string

The mailbox's email address.

name
string
provider
enum<string>

imap: Gmail, Google Workspace and every other provider through IMAP/SMTP.

Available options:
imap
status
enum<string>
  • running: connected and syncing.
  • errored: syncing keeps failing (server down, network); the engine retries by itself.
  • disconnected: the provider rejected the password or token (reconnect it), or the account is paused in the dashboard (is_locked: true).
Available options:
running,
errored,
disconnected
status_detail
string

The last error message

is_locked
boolean

Paused from the dashboard: not syncing.

initial_sync
object

Only on accounts connected with initial_sync_enable: true: the import of the mail already in the mailbox.

metadata
object

Your own key-value data.

connection_params
object

Connection settings, never passwords.

created_at
string<date-time>
last_synced_at
string<date-time> | null