List daily call metrics

View as Markdown
Returns one row per calendar day that had at least one call: volume, completions, successes, explicit rejections, average sentiment and frustration, average duration, average response latency, total cost and interruptions. It is the data behind a trend chart of any of those metrics, for the whole workspace, one campaign or one agent. **Filters.** `days` sets how far back to look (rolling window ending now, not aligned to midnight, so the oldest day is usually partial; missing or out-of-range values become 30). `direction`, `campaignId` and `agentId` narrow every row. `timezone` decides which calendar day a call falls in; an unknown zone name silently falls back to UTC. **Ordering.** Ascending by `date`, at most 366 rows. **No data.** Days without calls are omitted (no zero rows). Within a row, every average is `null` when no call that day carried the measurement (for example `avgLatencyMs` on calls recorded before telemetry existed), and `costUsd` / `interruptions` are `null` when no call carried a cost or turn data. Counts are always integers. **Idempotency.** Safe to retry: this is a read. **Consistency.** Cached for 120 seconds, then served stale for up to 15 minutes while a background refresh runs. **Access** - **Required scope:** `read`. Signed-in users need the owner, admin, member or viewer role. - **Rate limit:** Analytics — 30 requests/min per workspace, in addition to the general API budget of your plan. See [Rate limits](/rate-limits). - **Plan:** Available on every plan. A workspace without an active subscription (active, trialing or past due) gets `403 BILLING_ERROR`.

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

Size of the reporting window in days, ending now. On most analytics routes a missing or out-of-range value falls back to 30 instead of being rejected; the operation says when it is strict.

directionenumOptionalDefaults to all

Which calls to count: inbound (calls the agent answered), outbound (calls the agent placed) or all (both).

Allowed values:
campaignIdstringOptionalformat: "uuid"
Scope every number to one campaign of the workspace. Omit it to aggregate across all campaigns and manual calls.
agentIdstringOptionalformat: "uuid"

Scope every number to one agent — the agent that served each call, so manual (campaign-less) calls count. Omit it to aggregate across agents.

timezonestringOptional<=50 characters

IANA time zone the day and hour buckets are computed in (default UTC). An unknown zone falls back to UTC; a value longer than 50 characters is rejected with 400.

Response

Daily rows in ascending date order.
datalist of objectsOptional

Errors

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