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
- 202
- 401
- 403
- 404
- 409
- 422
Queued. The body is the state to render immediately.
Not authenticated. code: account_disabled means the member's seat was deactivated in this workspace: the session is over even though the token was not revoked (clients sign out and clean up).
Authenticated but not allowed.
Resource not found (or not visible to the current tenant).
A history sync is already queued or running on this channel.
Not an email channel, the transport is not Gmail, or since is invalid.