Skip to navigation

Retrieve the workspace KPI summary

View as Markdown

Call totals for the workspace plus the category KPIs of every campaign that recorded KPI data in the window. KPIs are computed per call from the data the agent extracts (see GET /api/analytics/kpi/templates/{category}) and are voice-only.

  • totalCalls counts every non-deleted call created in the window (any status, with or without a campaign). It is the VOLUME, not the denominator of successRate.
  • totalSuccessful counts the calls that became a conversation and whose outcome is a success outcome for any category (e.g. sale_closed, appointment_booked, payment_promised).
  • effectiveCompleted is the denominator of successRate: completed calls that ran 30 seconds or longer after rounding duration AND carried 8 transcript turns or more, plus at least 3 user and 3 agent speech turns when those counts are available. noEffectiveContact is the rest of the completed calls. Both are derived when the rows are read, never stored, so they apply to the whole history with the legacy duration/turn fallback until speech counts are backfilled.
  • analysedCalls of totalCalls is the coverage behind successRate.
  • successRate is a percentage 0-100 with two decimals.

successRate changed denominator on 2026-09-16, and the change is large. It was totalSuccessful / totalCalls — every row in the window, unanswered rings and failed dials included — and is now totalSuccessful / effectiveCompleted, the definition every other analytics surface uses. A workspace converting two thirds of the people it actually spoke to used to read around 12% on this card, and no other screen agreed with it.

  • categorySummaries has ONE ENTRY PER CAMPAIGN with KPI rows in the window — two sales campaigns produce two sales entries — in no guaranteed order, and without the campaign id. Use GET /api/analytics/kpi/{campaignId} for a specific campaign. breakdown is always {} here.
  • KPIs whose key ends in _today (e.g. revenue_today) cover the current day in your workspace’s timezone (since 2026-09-15; it was the UTC day before, and rows filed before that date were not moved).

No data. Numbers are 0, never null: successRate is 0 when there were no calls, avgDuration is 0 when no duration KPI was recorded, and categorySummaries is []. An avg KPI with no samples has value: 0 and count: 0 — check count before reading value.

Idempotency. Read-only; safe to retry.

Consistency. Cached for 120 seconds per workspace and days; the cache is cleared whenever a call’s KPIs are processed. Browser cache: private, max-age=30, stale-while-revalidate=900.

Access

  • Required scope: read. Signed-in users need the owner, admin, member or viewer role.
  • Rate limit: Analytics — 30 requests/min per workspace, shared with the rest of /api/analytics/*. Also counts against the general API limit. See Rate limits.
  • Plan: Available on every plan. Requires an active subscription (active, trialing or past_due); without one the request is refused with 403 BILLING_ERROR (metadata.kind: subscription_required).

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.

ScopeGET / HEADPOST / PUT / PATCH / DELETEAdmin-only routes
readYesNoNo
writeYesYesNo
fullYesYesYes

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.

Query parameters

daysintegerOptional1-365Defaults to 30

Look-back window in days. Never rejected - a non-integer, out-of-range (1-365) or non-numeric value falls back to 30.

Response

KPI summary.
dataobjectOptional

Errors

401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error