Get all conversation logs

View as Markdown
Retrieve paginated conversation logs with support for various filters. Returns call logs for agents belonging to the authenticated user's organization. **To discover new inbound calls, use webhooks instead of polling this endpoint.** Subscribe an agent to the `pre-conversation` webhook event: it fires the moment an inbound call connects and delivers `callId`, `fromPhone`, and `toPhone`, so you get every new call in real time with no polling load. See the [Webhooks guide](/voice-agents/platform/features/webhooks). Poll this endpoint only for backfill or reconciliation. **If you do poll, use the default sort.** The default query (no `sortBy`) sorts by `updatedAt` descending and is index-backed, so it stays fast even on large accounts. Request the first page and keep the list small: `page=1&limit=N` (optionally `callTypes=telephony_inbound` for inbound only). This returns in well under a second. To detect new calls between polls, track the conversation IDs you have already seen rather than a single timestamp, since the default order is `updatedAt` (a recently-updated older call can move to the top). **Avoid `sortBy=createdAt`, `dateFrom`, and `dateTo` on large accounts.** These sort or range-filter on `createdAt`, which is not index-backed for the organization-wide query and forces a full scan of your conversation history. On accounts with a large history this can exceed the gateway timeout and return a 504. Prefer the default `updatedAt` sort above. `agentIds` and `campaignIds` accept comma-separated IDs and narrow the result set, but do not pair them with `sortBy=createdAt` or `dateFrom` on large accounts (the `createdAt` sort/filter is the slow part, not the number of agents).

Authentication

AuthorizationBearer

API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.

Query parameters

pageintegerOptional>=1Defaults to 1
Page number for pagination
limitintegerOptional1-500Defaults to 5

Number of items per page. Server-side cap is 500 — values above 500 are silently clamped.

agentIdsstringOptional

Comma-separated list of agent IDs to filter by

campaignIdsstringOptional

Comma-separated list of campaign IDs to filter by

callTypesenumOptional

Comma-separated list of call types to filter by

Allowed values:
searchstringOptional
Search query to filter by callId, fromNumber, or toNumber
statusFilterstringOptional

Comma-separated list of call statuses to filter by. Available statuses: pending, in_progress, in_queue, processing, active, completed, failed, no_answer, cancelled

disconnectReasonFilterstringOptional

Comma-separated list of disconnect reasons to filter by. Available reasons: user_hangup, agent_hangup, connection_error, timeout, system_error, transfer_complete

callAttemptFilterstringOptional

Comma-separated list of call attempt types to filter by. Available filters: initial (first attempt calls), retry (retry attempt calls), all (all calls)

durationFilterstringOptional

Comma-separated list of duration ranges to filter by. Available ranges: 0-30 (0-30 seconds), 30-60 (30-60 seconds), 1-5 (1-5 minutes), 5+ (more than 5 minutes)

sortByenumOptional
Field to sort results by
Allowed values:
sortOrderenumOptional
Sort direction
Allowed values:
dateFromdatetimeOptional

ISO date — return calls created on or after this date

dateTodatetimeOptional

ISO date — return calls created on or before this date

versionFilterstringOptional

Comma-separated version IDs to filter calls by the agent version that handled them

Response

Successful response
statusbooleanOptional
dataobjectOptional

Errors

400
Bad Request Error
Invalid input
statusbooleanOptional
errorslist of stringsOptional
401
Unauthorized Error
500
Internal Server Error