平台文档

KPIs API

KPIs API

Endpoints

  • GET /kpis, list KPIs

  • GET /kpis/{kpiId}, get one KPI

  • GET /kpis/{kpiId}/history, value history

  • POST /kpis, create KPI

  • PATCH /kpis/{kpiId}, update current value

Scopes

kpis:read for GET; kpis:write for POST and PATCH.

List KPIs (GET /kpis)

  • limit, offset, pagination

  • sessionId, filter by planning session / quarter UUID

  • search, match title (case-insensitive)

curl "https://api.elevale.app/v1/workspaces/{workspaceId}/kpis?limit=10&search=revenue" \
  -H "Authorization: Bearer elv_pat_..."

Get KPI (GET /kpis/{kpiId})

The current field is the latest KPI value, no separate "latest" endpoint is required.

  • include=latestHistory, adds latestHistory: { value, note, date } from the most recent kpi_history row

curl "https://api.elevale.app/v1/workspaces/{workspaceId}/kpis/{kpiId}?include=latestHistory" \
  -H "Authorization: Bearer elv_pat_..."

KPI history (GET /kpis/{kpiId}/history)

Returns historical value entries. Accepts limit (default 50, max 100).

curl "https://api.elevale.app/v1/workspaces/{workspaceId}/kpis/{kpiId}/history?limit=10" \
  -H "Authorization: Bearer elv_pat_..."

Create body (POST)

  • title (required)

  • description, unit, direction (increase|decrease), current, category, sessionId (optional)

curl -X POST "https://api.elevale.app/v1/workspaces/{workspaceId}/kpis" \
  -H "Authorization: Bearer elv_pat_..." \
  -H "Content-Type: application/json" \
  -d '{"title":"Monthly revenue","unit":"GBP","direction":"increase","current":125000}'

Update body (PATCH)

  • currentValue (required), number

  • notes (optional), appended to KPI history

Related

Personal access tokens (PATs) · Scopes and permissions