Retrieve a KPI template

View as Markdown
The static KPI configuration for a campaign category: the data-collection fields an agent should extract so the category's KPIs can be computed, the success-evaluation criterion text, and a suggested suffix for the agent prompt. The same for every workspace. Use it when configuring an agent for a campaign; the resulting numbers are read with `GET /api/analytics/kpi/{campaignId}`. `description`, `successEvaluation` and `suggestedPromptSuffix` are Spanish product text meant to be placed in the agent configuration as-is. **Idempotency.** Read-only; safe to retry. **Consistency.** Static data, cached server-side for up to an hour; the response carries `Cache-Control: public, max-age=86400`. **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/*` (except `/analysis/*`); a KPI request consumes 2 units, so effectively 15 requests/min. 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).

Path parameters

categoryenumRequired

Campaign category. Any other value is a 400.

Response

Template for the category.
dataobjectOptional

Errors

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