PerspecTaskPerspecTask

Add a KPI entry to a task

Add a target (the number to reach, optionally by a date) or an actual (a reading at a moment; `at` required). Encrypted tasks are refused (403). An entry saved end-to-end encrypted in the web app comes back with `encrypted: true` and no `value`.

POST
/tasks/{id}/kpis

Add a target (the number to reach, optionally by a date) or an actual (a reading at a moment; at required). Encrypted tasks are refused (403). An entry saved end-to-end encrypted in the web app comes back with encrypted: true and no value.

Authorization

bearerAuth
AuthorizationBearer <token>

Your PerspecTask API key (starts with pt_live_). Each key carries scopes: tasks:read (GET), tasks:write (full create/update), and tasks:write:meta (create/update everything EXCEPT editing title/description of existing tasks — for automation that manages workflow without rewriting human-authored content). KPIs have their own: kpis:read and kpis:write (create, update and delete KPI entries). Time tracking: timers:read and timers:write (start, stop and edit timers). Task history: history:read (read only; nobody can edit it).

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/tasks/string/kpis" \  -H "Content-Type: application/json" \  -d '{    "kind": "target",    "value": 100000  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "kind": "target",
  "at": "2026-12-31T00:00:00.000Z",
  "value": 100000,
  "encrypted": true
}
Empty
Empty
Empty