POST /backfill-contact-analysis-data

Changed on

Trigger a backfill job that re-applies analysis data mappings to contacts using historical call and SMS chat data. Only one backfill job can run per organization at a time. Select contact_memory to rewrite memory from matching ended phone calls and SMS chats in chronological order, one conversation at a time, with no conversation-count cap. Backfill starts with the contact's existing memory. Each rewrite builds on the previous result, and the final successful result is saved once per contact. When mapped analysis fields and contact_memory are selected together, they are saved together in one contact update. Memory rewrites use the currently stored contact fields.

Request

  • Base URL
    https://api.retellai.com
  • Auth
    HTTP bearer

Request body

backfill_attributesstring[] required

Contact fields to recompute. Each one must still exist as a contact field and have an analysis data mapping configured, except for the built-in contact_memory attribute, which requires no mapping and supports requests on its own or alongside mapped fields. Memory backfill skips conversations without retained transcripts.

Example request

{
  "backfill_attributes": [
    "contact_memory"
  ]
}

Response

Backfill job started.

status'queued' | 'running' | 'idle' required
start_timestampnumber

Epoch milliseconds when the job started.

succeedednumber

Number of items processed successfully so far.

failednumber

Number of items that errored so far.

triggered_by'manual' | 'cron'

Whether the job was started by an explicit API call (manual) or by the scheduled sync (cron).

Changes