SimpleKPI Logo

SimpleKPI AI › API reference

KPI Units

A unit controls how a KPI's values are typed in and displayed — currency, percentage, plain number, decimal places. Units belong to your account, so unlike icons and frequencies you can create your own.

A unit still in use by a KPI cannot be deleted.

Base URL https://api.simplekpi.com/v1

Endpoints

  1. List KPI unitsGET /v1/kpiunits
  2. Create a KPI unitPOST /v1/kpiunits
  3. Get a KPI unitGET /v1/kpiunits/{id}
  4. Update a KPI unitPUT /v1/kpiunits/{id}
  5. Delete a KPI unitDELETE /v1/kpiunits/{id}

KPI unit object

NameTypeRead OnlyMandatoryMax Len.Notes
idintegeryesno Assigned by SimpleKPI when the unit is created.
namestringnoyes25What the unit is called, e.g. Pounds or Percent.
entry_formatstringnoyes25A numeric format string used when values are typed in. Digits and # are placeholders, , groups thousands, and one decimal group is allowed — for example #,##0.00, 0.## or #.00.
display_formatstringnoyes25The format used when the value is shown, in the same notation as entry_format.
is_percentagebooleannono True when values are treated as percentages.
created_atdatetimeyesno  
updated_atdatetimeyesno  

List KPI units

GET /v1/kpiunits

Requires kpis:read on the API key.

Parameters

NameTypeRequiredDefaultNotes
pageintegerno1Which page to return, counting from 1.
rowsintegerno500How many rows per page. Defaults to 500.

Using curl

curl https://api.simplekpi.com/v1/kpiunits \
  -H "Authorization: Bearer skpi_your_api_key"

Example response

Status: 200 OK
[
  {
    "id": 123,
    "name": "Pounds",
    "entry_format": "#,##0.00",
    "display_format": "#,##0",
    "is_percentage": false,
    "created_at": "2026-02-21T10:57:00",
    "updated_at": "2026-02-21T10:57:00"
  }
]

Status codes

CodeMeaning
200OK
400Bad Request
401Unauthorized
403Forbidden
429Too Many Requests

 

Create a KPI unit

POST /v1/kpiunits

Requires kpis:write on the API key.

Using curl

curl https://api.simplekpi.com/v1/kpiunits \
  -X POST \
  -H "Authorization: Bearer skpi_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"name":"Pounds","entry_format":"#,##0.00","display_format":"#,##0","is_percentage":false}'

Example request body

{
  "name": "Pounds",
  "entry_format": "#,##0.00",
  "display_format": "#,##0",
  "is_percentage": false
}

Status codes

CodeMeaning
201Created
400Bad Request
401Unauthorized
403Forbidden
409Conflict
429Too Many Requests

 

Get a KPI unit

GET /v1/kpiunits/{id}

Requires kpis:read on the API key.

Parameters

NameTypeRequiredDefaultNotes
idintegeryes The unit to return.

Using curl

curl https://api.simplekpi.com/v1/kpiunits/{id} \
  -H "Authorization: Bearer skpi_your_api_key"

Status codes

CodeMeaning
200OK
401Unauthorized
403Forbidden
404Not Found
429Too Many Requests

 

Update a KPI unit

PUT /v1/kpiunits/{id}

A full replacement, not a patch.

Requires kpis:write on the API key.

Parameters

NameTypeRequiredDefaultNotes
idintegeryes The unit to replace.

Using curl

curl https://api.simplekpi.com/v1/kpiunits/{id} \
  -X PUT \
  -H "Authorization: Bearer skpi_your_api_key"

Status codes

CodeMeaning
200OK
400Bad Request
401Unauthorized
403Forbidden
404Not Found
409Conflict
429Too Many Requests

 

Delete a KPI unit

DELETE /v1/kpiunits/{id}

A unit still assigned to a KPI cannot be deleted — reassign those KPIs first.

Requires kpis:write on the API key.

Parameters

NameTypeRequiredDefaultNotes
idintegeryes The unit to delete.

Using curl

curl https://api.simplekpi.com/v1/kpiunits/{id} \
  -X DELETE \
  -H "Authorization: Bearer skpi_your_api_key"

Status codes

CodeMeaning
204No Content
400Bad Request
401Unauthorized
403Forbidden
404Not Found
429Too Many Requests