Analytics API overview
The Analytics API gives you the call data behind Monitor, one agent at a time: every try at reaching a user, every conversation that took place, and the transcript and audio of each conversation. Use it to feed your own reporting, CRM, or QA pipeline.
Base URL
Analytics is agent-scoped: every path carries the app_id of one agent. Copy it from the agent’s ··· menu in the dashboard (Copy agent ID). For org_id and workspace_id, see Introduction.
Authentication
Send your API key in the X-API-Key header on every request. Bearer tokens are not accepted on these endpoints.
Attempts and interactions
The two list endpoints answer different questions:
- An attempt is one try at reaching a user — one outbound dial or one inbound connection — whether or not it connected. Use List attempts for reachability: connection rates, busy and unanswered calls, failure reasons, campaign retries.
- An interaction is a conversation that actually happened. Use List interactions for what was said and how it went: duration, language, response times, how the call ended, and the final values of your agent variables.
An attempt that connects links to its interaction through interaction_id.
How the pieces fit together
List interactions
List interactions for a date range, narrowed with filter_conditions if you need to. Each item carries an interaction_id.
Fetch the transcript
Pass the interaction_id to Get transcript. For many interactions at once, call List interactions with include_transcript=true instead.
Download the recording
Pass the same interaction_id to Get recording, which returns audio/wav. Save it with curl ... -o call.wav.
Interaction IDs
An interaction_id has the form <YYYYMMDD>/<id>:
It contains a /. In the transcript and recording paths you can send it as is or encode the slash as %2F — both are accepted. An ID without a / returns 400.
Filtering
Both list endpoints require start_datetime and end_datetime. Both are inclusive, and the end must be later than the start. Send ISO 8601 with an offset, such as 2026-10-01T00:00:00+05:30, and encode the + as %2B. Without an offset, UTC is assumed. Timestamps in responses are UTC, with no offset.
Narrow the results with filter_conditions, a URL-encoded JSON array of conditions:
valueis always a string, even for numbers. Foris_emptyandis_not_empty, send"".- Conditions on the same field are ORed; conditions on different fields are ANDed.
- An unknown field returns
422. Invalid JSON, an unknown operator, or a missingvaluereturns400.
Pagination
List responses carry items, total, limit, offset, next_page_uri, and prev_page_uri. limit defaults to 20 and goes up to 1000.
next_page_uri and prev_page_uri are relative query strings that repeat your parameters with the new offset, for example ?start_datetime=...&end_datetime=...&limit=20&offset=20. Append them to the endpoint path to fetch the next or previous page. They are an empty string ("", not null) when there is no such page.
List responses are cached for 60 seconds, so repeating an identical request within that window returns the same result.
Personal data
Attempts and interactions include user_contact: the user’s full, unmasked phone number or email address. Treat responses as personal data — restrict who can read them, and keep them out of logs. Where you don’t need the raw value, use user_contact_masked (for display) or user_contact_hashed instead. Agent variables, transcripts, and recordings can contain personal data too.
Errors
Every error carries a detail field. For most failures it is a message string:
A 422 for a malformed request parameter carries a list of validation errors instead, and an invalid sort_order returns an object with error and message. Each endpoint page lists its error responses with examples.
Rate limits
Requests are rate-limited per API key; the limit is configured per organization. Exceeding it returns 429 with a Retry-After header giving the seconds to wait:
Honour Retry-After rather than retrying immediately, and back off exponentially if you see repeated 429s. If your workload needs more headroom, contact Sarvam support.