List a campaign KPI time series
Daily raw totals of a single KPI for a campaign, ascending by date. Since 2026-09-15 a KPI row is
filed under the day in your workspace’s timezone; rows written before that date stay on the UTC day
they were filed under and were NOT backfilled, so a range that spans 2026-09-15 mixes both. The kpi query
parameter is required; pass one of the keys returned by GET /api/analytics/kpi/{campaignId}
(e.g. revenue_total). Omitting it returns 400 VALIDATION_FAILED.
Each row holds the day’s accumulated value and count, NOT the aggregated KPI: for an avg KPI
(e.g. avg_ticket) divide value by count yourself; for a count KPI read count (its
value is 0). A distribution KPI key returns daily counts without labels.
No data. Only days with recorded samples appear (no zero rows). An unknown KPI key, an
unknown campaign, or one from another workspace returns an empty data array, not an error.
Idempotency. Read-only; safe to retry.
Consistency. Cached 120 seconds per campaign, kpi and days.
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,trialingorpast_due); without one the request is refused with403 BILLING_ERROR(metadata.kind: subscription_required).
Authentication
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.
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.
Path parameters
UUID of the campaign. A non-UUID is a 400; an unknown id returns an empty list.
Query parameters
KPI key to chart (case-sensitive). Missing, empty or longer than 100 characters is a 400.
Look-back window in days. Never rejected on its own - a non-integer, out-of-range (1-365) or non-numeric value falls back to 30.

