Retrieve the text conversation overview

View as Markdown
Headline numbers for text conversations (WhatsApp, webchat, email, Instagram, Messenger) created in the last `days` days: how many there were, how many have been analysed, the outcome split, and the average sentiment, plus a `byChannel` breakdown. Use it for the top of a text-channel dashboard; drill down with `GET /api/analytics/conversations/criteria`, `GET /api/analytics/conversations/sentiment-trend` and `GET /api/analytics/conversations/attention`. Voice calls are reported by `GET /api/analytics/overview` instead. `channel` filters the headline numbers only; `byChannel` always covers every channel present in the window, sorted by `total` descending. **No data.** A thread without analysis is never folded in as zero or neutral: it is excluded from `outcomes` and `avgSentiment` and counted in `pending` (the analysis sweep is still working on it) or `notAnalysable` (no voice-engine conversation on record, or five fetch attempts spent). Counts are `0` when there is nothing in range; `avgSentiment` is `null` (never `0`) when nothing was scored, and `sentimentSampleSize` says how many threads the average covers. **Idempotency.** Read-only; safe to retry. **Consistency.** Computed live from the database on every request (no server cache). Analysis arrives asynchronously after a thread goes quiet, so recent threads show up in `pending` first. The response carries `Cache-Control: private, max-age=30, stale-while-revalidate=900`. **Access** - **Required scope:** `read`. Signed-in users need the owner, admin, member or viewer role (the billing role is refused). - **Rate limit:** Analytics — 30 requests/min per workspace, one budget shared with the rest of `/api/analytics/*` (except `/api/analytics/analysis/*`). The request also counts against the general API limit. See [Rate limits](/rate-limits). - **Plan:** Available on every plan (behind the `advancedDashboard` feature gate, which is enabled on every plan).

Authentication

AuthorizationBearer
Workspace API key: `jl_` followed by 64 lowercase hex characters, created by the workspace owner in the dashboard (**Settings → API Keys**) and sent as `Authorization: Bearer jl_...`. The plaintext is shown once, at creation; Jelliu stores only a SHA-256 hash. A workspace can hold up to 25 active keys. | Scope | GET / HEAD | POST / PUT / PATCH / DELETE | Admin-only routes | | --- | --- | --- | --- | | `read` | Yes | No | No | | `write` | Yes | Yes | No | | `full` | Yes | Yes | Yes | Operations restricted to admins or owners reject keys without the `full` scope with `403`, and say so in their description. No key, whatever its scope, can mint or revoke API keys or rotate a webhook secret — that requires a signed-in owner session. A revoked key stops authenticating within about 10 seconds. See [Authentication](/authentication).

Query parameters

daysintegerOptional1-365Defaults to 30

Window in days ending now (rolling 24-hour days). Must be an integer from 1 to 365; a decimal, non-numeric, zero or larger value is rejected with 400 rather than clamped.

channelenumOptional

Restrict the headline numbers to one channel. Does not affect byChannel. Any other value is a 400.

Allowed values:

Response

Overview for the window. days echoes the effective window.

dataobjectOptional

Headline numbers for text conversations (WhatsApp, webchat, email, Instagram, Messenger) created in the window. Unanalysed threads are never averaged in: they are reported in pending or notAnalysable, and avgSentiment is null (not 0) when nothing was scored.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error