Sync

Sync an inbox

POST https://getinboxtriage.com/api/inboxes/{id}/sync

Syncs the inbox now and waits for the result. A sync already running is joined, not started twice.

A sync that finished under a minute ago is skipped and returns skipped: true. Provider failures come back as ok: false with an error, still HTTP 200.

Headers

NameTypeRequiredDescription
Authorization string Required Bearer followed by your API key.

Path parameters

NameTypeRequiredDescription
id string Required Inbox id from List inboxes, like inbox_lx2k9a1b.

Response

200 OK.

NameTypeDescription
ok boolean false when the sync failed or the inbox is not connected.
status string connected, demo, not_connected, or error.
messageCount number Messages in the synced window.
skipped boolean true when the last sync was under a minute ago.
isDemo boolean true when sample data was used because no credential is stored.
error string Only when ok is false.
needsReconnect boolean true when the person has to reconnect. sayToHuman and reconnectUrl come with it.

Errors

StatusErrorMeaning
404 inbox_not_found The inbox id is wrong or the inbox was removed.
409 inbox_paused The person paused this inbox. They resume it on the Inboxes page.

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.