Skip to main content
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

object
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.
string
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.
array
Additional aggregation specs to compute alongside the base stats. Each entry is { name, type, field, limit? }:
  • type: "group_by" — counts grouped by distinct values of field (e.g. group by disposition), sorted descending, capped at limit (default 100).
  • type: "timeseries" — daily counts bucketed by field (a date field), respecting timezoneOffsetMinutes.
integer
default:"0"
Timezone offset applied to timeseries bucketing.

Response

boolean
integer
Total matching conversations
object
string
elasticsearch or mongo-fallback

Example

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