Get Conversation Stats
Conversations
Get Conversation Stats
Aggregate metrics for conversations matching a filter — counts, averages, and custom breakdowns.
POST
Get Conversation Stats
Runs a DSL filter against your project’s conversations and returns aggregate metrics — counts and custom breakdowns — without returning individual conversation records or transcript content.
Body Parameters
DSL filter object. Combine with
and/or/not combinators, or a single { field, op, value } clause using operators like eq, neq, contains, in, between, exists. The project scope is applied automatically.Free-text search across lead ID, stream ID, call SID, disposition, tags, and transcript content. A 10-digit value matches by phone hash; a 24-char hex string matches lead/conversation ID; a 32-char hex string matches stream ID or call SID.
Additional aggregation specs to compute alongside the base stats. Each entry is
{ name, type, field, limit? }:type: "group_by"— counts grouped by distinct values offield(e.g. group bydisposition), sorted descending, capped atlimit(default 100).type: "timeseries"— daily counts bucketed byfield(a date field), respectingtimezoneOffsetMinutes.
Timezone offset applied to
timeseries bucketing.Response
Total matching conversations
elasticsearch or mongo-fallbackExample
Error Responses
- 400 Bad Request — missing project scope.
- 500 Internal Server Error —
{ "success": false, "message": "Failed to aggregate conversations", "error": "..." }
See Also
- Conversations — browse and search conversations from the dashboard
