Skip to main content
POST
/
api
/
orgs
/
{id}
/
kpis
Create KPI
curl --request POST \
  --url https://atollhq.com/api/orgs/{id}/kpis \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "goal_id": "<string>",
  "unit_label": "<string>",
  "target_value": 123,
  "source_config": {},
  "stale_after_hours": 123
}
'
{}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

id identifier

Body

application/json
name
string
description
string
goal_id
string
unit
enum<string>
Available options:
count,
percentage,
currency,
duration,
ratio,
custom
unit_label
string
target_value
number
target_direction
enum<string>
Available options:
increase,
decrease,
maintain
source_type
enum<string>

Use formula with source_config.formula=goal_linked_issue_completion for calculated goal task-completion KPIs.

Available options:
manual,
webhook,
api_poll,
formula
source_config
object

Source-specific configuration. For internal task completion KPIs, use {"formula":"goal_linked_issue_completion","done_statuses":["done"]}.

stale_after_hours
integer

Response

Successful response

The response is of type object.