Skip to main content
POST
/
api
/
email
/
messages
/
sync
Sync email messages from provider
curl --request POST \
  --url https://your-instance.example.com/api/email/messages/sync \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accountId": "665f1a0c0e0a4b001a2c9f50",
  "maxResults": 500,
  "lookbackDays": 30
}
'
{
  "status": "running"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
accountId
string
required

EmailAccount _id to sync.

maxResults
number

Cap on messages fetched per sync run.

lookbackDays
number | null

Optional override for the sync window; null = use account default.

Response

Sync started or status returned

Returned immediately after POST /api/email/messages/sync kicks off the historical sync. Poll GET /api/email/messages/sync/status for progress.

status
enum<string>
required
Available options:
running