Skip to main content
POST
Sync History
Imports a connected account’s message history, one bounded run at a time, and returns a request_id to poll. Paid: one flat price per run (see Pricing). Requires the read grant. A run imports messages newest-first, up to max_pages pages of 250, then is paused; the next call with mode: "continue" resumes it. Nothing is imported twice. GET /v1/requests/{request_id} shows live progress.

Request

string
required
Connected LinkedIn account id.
string
default:"continue"
continue resumes the newest paused run, or starts from the newest message. restart discards paused runs and starts from the newest message. history does what continue does and also restarts the history import; use it when coverage.history_sync_status is error.
number
default:"10"
Pages of 250 messages this run may fetch, 1–10. The flat price covers up to 10. A 10,000-message inbox is four runs.

Before payment

A rejected sync is never charged. The account must be yours (404 account_not_found), connected (409 reconnect_required), have the read grant (403 grant_denied), and have no run queued or running (409 sync_in_progress with run_id).

Response

The job result reports outcome ∈ exhausted (reached the end) · bounded (page limit reached, needs_continuation: true) · partial (an error after some imports; continue resumes it), plus pages, requests, messages_seen, messages_inserted, messages_updated, conversations_inserted, earliest_seen_at, latest_seen_at, duration_ms and history_sync_status.

Coverage

GET /v1/tools/linkedin/accounts/{id}/sync (free) returns:
  • history_sync_status: never, requested, running, done or error; history_sync_completed_at is when it finished.
  • enumerated_as_of: start time of the latest full run that reached the end. enumerated_back_to: the oldest message stored.
  • pending_cursor: true (has_next_cursor on one run): a paid run is paused; call sync again to continue it.
coverage.complete is true only when history_sync_status is done, a full run started after that and reached the end, and no paused run remains. Until then sync_state is partial, or syncing while a run is active. If your run reached the end while history_sync_status is still requested or running, the rest of the history is imported automatically at no charge. A run paused at its page limit still needs an explicit continue.

Incremental updates

New, edited, deleted and read messages arrive automatically; conversation details refresh nightly. Never charged; never continues a paused paid run.

When you are charged

Example