What gets stored
The session record — status, timing, caller attribution, name, andmetadata — and the conversation transcript are always kept for production sessions. Audio recording is a per-agent choice, on by default: set conversation.record_audio in the console under your agent’s Settings or in the conversation section of the config API, with a per-session override on the session request. Recording off means there is no audio to download.
The setting doesn’t affect the live call: transcript events still stream to connected clients in real time.
List sessions
GET /v1/agent/sessions returns session facts, newest first. The list is intentionally thin — no transcripts or tool details — so it stays fast at any volume.
caller_number and dialed_number are set for phone sessions only (E.164) and are null for web sessions. name is the display name you passed when creating the session (null when omitted), and metadata echoes back whatever you attached when creating the session.
Filters
pending sessions — a session was created but no participant ever connected —
are excluded by default. Pass status=pending explicitly to see them. Preview
calls made from the Builder never appear in this API.Pagination
Two modes, mutually exclusive (combining them returns400):
page_size defaults to 30, maximum 100; values out of range are rejected. In cursor mode total is null unless you pass include_total=true. Page mode is capped at an offset of 100,000 rows — requests beyond it return 400 — and every page response still includes next_cursor, so you can switch to cursor crawling from any page for deep scans.
Get a session
GET /v1/agent/sessions/{session_id} returns the session facts plus a single items timeline: messages and tool activity merged in the order they actually happened.
API (curl)
Item types
Details worth knowing:
- Role vocabulary — the history API’s
assistantis the same speaker the SDK’s live events callagent. - Order — items are sorted by
created_atascending; atool_result’s timestamp is its completion time, so long-running tools appear where they actually finished, with messages in between. Items sharing a timestamp ordermessage, thentool_call, thentool_result. tool_source— where the tool ran:client,webhook,builtin(platform tools such as call transfer and hang-up),mcp(tools from a connected MCP server),background(work the agent delegated to a background task), orunknown(calls recorded before source attribution). Treat it as an open set. See Tools.- Payloads —
inputandoutputare JSON strings, symmetric with the live SDK events, so one parser covers both.outputanderrorare stored up to 256 KB; beyond that the text is cut andoutput_truncatedistrue. - Mid-call queries — you can fetch an
activesession; you get the items persisted so far, andanalysisisnulluntil post-call analysis completes. - A
tool_callwithout a matchingtool_resultmeans the execution never resolved.
Correlate with live events
call_id is the same identifier your client receives in the SDK’s toolCallStarted / toolCallCompleted / toolCallFailed events. Log it live, and you can align in-call UI with the post-call record — jump from a tool chip in your interface straight to the matching tool_call / tool_result pair in history. See the Web SDK.
Download recordings
GET /v1/agent/sessions/{session_id}/recording returns the recording status and signed download URLs — one audio track per speaker, so you can play or process the agent and the user separately. Recordings exist only when the session was recorded: for sessions that never recorded — recording turned off, or no audio produced — the endpoint returns 404.
API (curl)
session_id and request fresh URLs when you need the audio. For the same reason, recordings are not embedded in the session detail response.
Access semantics
- Your API key sees every production session across your team’s workspaces, from all sources.
- A session that doesn’t exist — or belongs to another team — always returns
404, never403. The recording endpoint additionally returns404for a session that exists but was never recorded.
Going further
Post-call analysis
What the embedded
analysis object contains and how to configure it.Webhooks
Push instead of poll — get notified when sessions end.
Web SDK
The live
toolCall* events that share call_id with history.Inbound calls
Where
caller_number and dialed_number come from.
