Skip to main content
PATCH
Update KPI

Update KPI

Update one or more fields of a KPI definition. Only send the fields you want to change.
For select KPIs: when you send options, the array replaces the current options entirely. Include existing option ids to keep them (optionally renaming/reordering); omit an id to delete that option. New options (without id) are created.

Request

Headers

string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Path Parameters

string
required
UUID of the parent dataset
string
required
UUID of the KPI to update

Body Parameters

All fields are optional — only send what you want to change.
string
KPI name (1–255 characters)
string
KPI description (max 2000 characters)
string
Measurement unit (max 50 characters)
string
Answer type: number, text, percentage, date, boolean, select
boolean
Whether a response value is mandatory
integer
Display order within the dataset (0-based)
array[object]
For select KPIs: full replacement array of options (2–100). Each object:

Response

Returns the updated KPI definition (HTTP 200).
string
KPI UUID.
string
Parent dataset UUID.
string
KPI display name.
string | null
KPI description.
string | null
Measurement unit (e.g. , kWh).
string
Data type: number, text, percentage, date, boolean, or select.
boolean
Whether a response value is mandatory.
integer
Display order within the dataset.
array[object]
Available choices for select-type KPIs. Each has id, label, and sort_order.
datetime
Creation timestamp (ISO 8601).
string | null
Last update timestamp (ISO 8601).

Example

Successful Response

Common Errors

401 Unauthorized

Cause: Missing or invalid API key

403 Forbidden

Cause: The authenticated user is not a member of the organization

404 Not Found

Cause: KPI not found

422 Validation Error

Cause: Empty options array for a select KPI

Create KPI

Add a new KPI to the dataset

Delete KPI

Remove a KPI definition