Skip to main content
Pull call detail records into your own database on a schedule, without re-fetching calls you’ve already synced. Time required: ~15 minutes You will need: an API key with read access to CDRs — see Authentication

Steps

1

Fetch a page of CDRs

Each record includes call_id, direction, caller, callee, start_time, duration_seconds, status, hangup_cause, and more — see Call and lead states for what status does and doesn’t tell you.
2

Page through the rest

Use offset to page — increment it by your limit and keep requesting until a response returns fewer records than you asked for.
3

Store each record, keyed by call_id

Upsert on call_id in your own database — this makes a re-run safe if a sync is interrupted partway through.
4

Advance your sync window for next time

Record the latest start_time you saw. On your next run, set from to that value (or slightly earlier, to tolerate clock skew) instead of 2026-08-01T00:00:00Z.

What you accomplished

A repeatable, incremental sync you can run on a schedule — each run only asks for calls since the last one, and upserting by call_id makes re-running a window harmless.

Next steps

Push leads into a campaign

React to call events