Skip to main content

Start or resume an email channel's history sync

POST 

/api/inbox/channels/:channel/history-sync

START the one-shot import (optionally moving since and any effect switch): the state is parked as queued and the job dispatched. resume: true continues a paused or failed run from its cursor, keeping its counters and its total. resume: false or absent starts a FRESH run — counters, cursor and total reset; the run first counts the window exactly (phase: counting), then imports (phase: importing). Mail already stored is never fetched again: it is probed, skipped and counted in skipped. A paused run may be resumed or fresh-started (discarding the pause). A run already queued/running is a 409. Authorisation: see MailHistorySync.can_manage. Gmail transport only — any other transport is refused with 422.

Request​

Responses​

Queued. The body is the state to render immediately.