API reference
All addresses start with https://api.knorky.com/api/v1. This page is built from the API’s machine-readable description: openapi.json. What errors mean is in the guide.
Clients and projects
Section titled “Clients and projects”GET /clients
Section titled “GET /clients”List the clients, ordered by name.
| Field | Type | Description |
|---|---|---|
include_archivedquery |
boolean |
Also list archived clients; default false. |
Example request
curl -H "Authorization: Bearer $KNORKY_API_KEY" \ "https://api.knorky.com/api/v1/clients"Example answer: The clients: id, name, archived.
[ { "archived": false, "id": "c1", "name": "Acme" }]GET /projects
Section titled “GET /projects”List the projects, ordered by name, optionally of one client.
| Field | Type | Description |
|---|---|---|
client_idquery |
string |
Only projects of this client (an id from GET /clients). |
include_archivedquery |
boolean |
Also list archived projects; default false. |
Example request
curl -H "Authorization: Bearer $KNORKY_API_KEY" \ "https://api.knorky.com/api/v1/projects"Example answer: The projects: id, name, client_id, client, archived.
[ { "archived": false, "client": "Acme", "client_id": "c1", "id": "p1", "name": "Website" }]GET /tasks
Section titled “GET /tasks”List tasks with their type (timed or to-do), due date, project, client, running state, estimate, tracked time and linked issues. Open tasks by default, at most 50.
| Field | Type | Description |
|---|---|---|
due_byquery |
string |
Only tasks due on or before this day (YYYY-MM-DD); pass today for the ones overdue or due today. Tasks without a due date are left out. |
issuequery |
string |
Only tasks linked to this issue: its key (LIN-123, repo#42, owner/repo#42) or URL, case-insensitive. |
limitquery |
integer |
At most this many tasks, 1–200; default 50. |
project_idquery |
string |
Only tasks of this project (an id from GET /projects). |
searchquery |
string |
Case-insensitive text the title must contain. |
statusquery |
string |
"open" (default), "done" or "all". |
task_typequery |
string |
Only tasks of this type: "timed" (they hold tracked time) or "todo" (checklist items without time); default both. |
Example request
curl -H "Authorization: Bearer $KNORKY_API_KEY" \ "https://api.knorky.com/api/v1/tasks"Example answer: The tasks, newest first.
[ { "client": "Acme", "done": false, "id": "t1", "links": [], "project": "Website", "project_id": "p1", "running": false, "task_type": "timed", "title": "Write invoice", "tracked_hm": "1:30", "tracked_minutes": 90, "tracked_seconds": 5400 }]POST /tasks
Section titled “POST /tasks”Create a task at the top of a project, optionally linked to a Linear or GitHub issue.
| Field | Type | Description |
|---|---|---|
project_idbody, required |
string |
The project to add the task to (an id from GET /projects). |
titlebody, required |
string |
The task’s title, 1–500 characters. |
due_datebody |
string |
The day it is due, YYYY-MM-DD in the user’s calendar; default none. |
linkbody |
object |
The issue the task is for, linked as the app links it; default none. |
link.external_idbody, required |
string |
The tracker’s own id: for Linear the issue’s id (a UUID, not LIN-123); for GitHub owner/repo#42. |
link.identifierbody |
string |
What people call it, e.g. LIN-123. Required for Linear; for GitHub default repo#42, as the app shows it. |
link.sourcebody, required |
string |
"linear" or "github". |
link.urlbody |
string |
The issue’s https:// address. Required for Linear; for GitHub default its github.com address. |
notesbody |
string |
Notes on the task, at most 10 000 characters; default none. |
task_typebody |
string |
"timed" (holds tracked time) or "todo" (a checklist item that holds none and cannot change later); default the project’s default type. |
Example request
curl -H "Authorization: Bearer $KNORKY_API_KEY" -H "Content-Type: application/json" \ -d '{"project_id":"<project_id>","title":"Send the invoice"}' \ "https://api.knorky.com/api/v1/tasks"Example answer: The new task.
{ "task": { "id": "t2", "title": "Fix the footer" }}PATCH /tasks/{task_id}
Section titled “PATCH /tasks/{task_id}”Rename a task, mark it done (stopping its timer) or open again, or set or clear its due date; several at once go in that order.
| Field | Type | Description |
|---|---|---|
task_idpath, required |
string |
The task (an id from GET /tasks). |
donebody |
boolean |
true marks the task done (stopping its timer), false open again. |
due_datebody |
string |
The day it is due, YYYY-MM-DD in your calendar; null clears it. Left out, the date stays as it is. |
titlebody |
string |
The new title, 1–500 characters. |
Example request
curl -X PATCH -H "Authorization: Bearer $KNORKY_API_KEY" -H "Content-Type: application/json" \ -d '{"done":true}' \ "https://api.knorky.com/api/v1/tasks/<task_id>"Example answer: The task as the last change left it, and any timer that marking it done stopped.
{ "stopped": [], "task": { "done": true, "id": "t1", "title": "Write invoice" }}DELETE /tasks/{task_id}
Section titled “DELETE /tasks/{task_id}”Delete a task or to-do for good, in every app. A task that holds tracked time or a running timer is refused.
| Field | Type | Description |
|---|---|---|
task_idpath, required |
string |
The task (an id from GET /tasks). |
Example request
curl -X DELETE -H "Authorization: Bearer $KNORKY_API_KEY" \ "https://api.knorky.com/api/v1/tasks/<task_id>"Example answer: The task that was deleted.
{ "deleted": { "id": "t1", "project": "Home", "project_id": "p1", "task_type": "todo", "title": "Buy nappies" }}Timers
Section titled “Timers”GET /timers
Section titled “GET /timers”What runs now: each running timer and who started it ("app", "api" or "ai_assistant"), and the running break.
Example request
curl -H "Authorization: Bearer $KNORKY_API_KEY" \ "https://api.knorky.com/api/v1/timers"Example answer: The running timers and the break, if any.
{ "break": null, "running": [ { "entry_id": "e1", "hm": "0:25", "minutes": 25, "project": "Website", "seconds": 1500, "started_at": "2026-10-27T08:00:00.000Z", "started_by": "api", "task": "Write invoice", "task_id": "t1" } ]}POST /timers
Section titled “POST /timers”Start tracking time on a task. mode "split" (the default) keeps the other timers and shares the time evenly between them; "only" stops every other running timer. Ends a running break; reopens a done task.
| Field | Type | Description |
|---|---|---|
task_idbody, required |
string |
The task to track time on (an id from GET /tasks). |
modebody |
"split" | "only" |
What happens to the time of the other running timers; default "split". |
notebody |
string |
A note on the new time entry; default none. |
Example request
curl -H "Authorization: Bearer $KNORKY_API_KEY" -H "Content-Type: application/json" \ -d '{"task_id":"<task_id>"}' \ "https://api.knorky.com/api/v1/timers"Example answer: What it started and what it stopped.
{ "break_ended": null, "started": { "started_at": "2026-10-27T08:00:00.000Z", "task": "Write invoice", "task_id": "t1" }, "stopped": []}POST /timers/{task_id}/stop
Section titled “POST /timers/{task_id}/stop”Stop a task’s running timer, in whichever app it runs, optionally noting what was done.
| Field | Type | Description |
|---|---|---|
task_idpath, required |
string |
The task (an id from GET /tasks). |
notebody |
string |
What was done, at most 2 000 characters; replaces the entry’s note. Default: the note stays as it is. |
Example request
curl -X POST -H "Authorization: Bearer $KNORKY_API_KEY" \ "https://api.knorky.com/api/v1/timers/<task_id>/stop"Example answer: What it stopped and how long each ran.
{ "stopped": [ { "hm": "0:25", "minutes": 25, "task": "Write invoice", "task_id": "t1" } ]}POST /timers/stop
Section titled “POST /timers/stop”Stop every running timer on the account, in every app. No body.
Example request
curl -X POST -H "Authorization: Bearer $KNORKY_API_KEY" \ "https://api.knorky.com/api/v1/timers/stop"Example answer: What it stopped and how long each ran.
{ "stopped": [ { "hm": "0:25", "minutes": 25, "task": "Write invoice", "task_id": "t1" } ]}Breaks
Section titled “Breaks”POST /break
Section titled “POST /break”Start a break: stops every running timer and records the break. A running break is joined. Refused while breaks are switched off in the app.
| Field | Type | Description |
|---|---|---|
notebody |
string |
A note on the break, at most 2 000 characters; default none. |
Example request
curl -X POST -H "Authorization: Bearer $KNORKY_API_KEY" \ "https://api.knorky.com/api/v1/break"Example answer: When the break started and what it stopped.
{ "break_started_at": "2026-10-27T12:00:00.000Z", "stopped": []}DELETE /break
Section titled “DELETE /break”End the running break. A break started through the API brings back the timers it stopped, unless resume is false.
| Field | Type | Description |
|---|---|---|
resumequery |
boolean |
Bring back the timers the break stopped; default true. Only a break the API or the AI assistant started knows what it stopped. |
Example request
curl -X DELETE -H "Authorization: Bearer $KNORKY_API_KEY" \ "https://api.knorky.com/api/v1/break"Example answer: How long the break was and what was resumed.
{ "break_ended_at": "2026-10-27T12:30:00.000Z", "break_started_at": "2026-10-27T12:00:00.000Z", "ended": true, "hm": "0:30", "minutes": 30, "resumed": [ { "task": "Write invoice", "task_id": "t1" } ]}Time entries
Section titled “Time entries”GET /entries
Section titled “GET /entries”The time entries between two dates (at most 31 days) in the given time zone, with a total per day.
| Field | Type | Description |
|---|---|---|
from_datequery, required |
string |
The first day, inclusive, as YYYY-MM-DD. |
timezonequery, required |
string |
The user’s IANA time zone, e.g. Europe/Berlin. |
client_idquery |
string |
Only entries of this client’s projects (an id from GET /clients). |
project_idquery |
string |
Only entries of this project’s tasks (an id from GET /projects). |
to_datequery |
string |
The last day, inclusive, as YYYY-MM-DD; default from_date. At most 31 days counted inclusively. |
Example request
curl -H "Authorization: Bearer $KNORKY_API_KEY" \ "https://api.knorky.com/api/v1/entries?from_date=2026-11-01&timezone=Europe/Berlin"Example answer: The days and their entries.
{ "days": [], "from_date": "2026-10-27", "timezone": "Europe/Berlin", "to_date": "2026-10-27", "total_hm": "0:00", "total_minutes": 0}POST /entries
Section titled “POST /entries”Add a finished entry from start to end or for duration_minutes. Warns about overlaps and invoiced months; saved either way.
| Field | Type | Description |
|---|---|---|
startbody, required |
string |
When the work started: a local time in timezone (2026-10-10T09:00) or ISO 8601 with an offset. |
task_idbody, required |
string |
The task the time was spent on (an id from GET /tasks). |
timezonebody, required |
string |
The user’s IANA time zone, e.g. Europe/Berlin. |
duration_minutesbody |
integer |
How long it took, in minutes, 1–1440. Give end or duration_minutes. |
endbody |
string |
When it ended, written as start is. Give end or duration_minutes. |
notebody |
string |
What was done, at most 2 000 characters; default none. |
Example request
curl -H "Authorization: Bearer $KNORKY_API_KEY" -H "Content-Type: application/json" \ -d '{"start":"2026-11-05T09:00","task_id":"<task_id>","timezone":"Europe/Berlin","duration_minutes":90}' \ "https://api.knorky.com/api/v1/entries"Example answer: The new entry and any warnings.
{ "entry": { "entry_id": "e2", "hm": "2:00", "minutes": 120, "task_id": "t1" }, "warnings": []}PATCH /entries/{entry_id}
Section titled “PATCH /entries/{entry_id}”Correct a finished entry: its start, end or length, note, or task. A running entry cannot be corrected.
| Field | Type | Description |
|---|---|---|
entry_idpath, required |
string |
The time entry (an id from GET /entries). |
timezonebody, required |
string |
The user’s IANA time zone, e.g. Europe/Berlin. |
duration_minutesbody |
integer |
A new length in minutes, 1–1440, kept from the (new) start; default unchanged. Not together with end. |
endbody |
string |
A new end; default unchanged. Not together with duration_minutes. |
notebody |
string |
A new note, at most 2 000 characters; "" clears it. Default unchanged. |
startbody |
string |
A new start, written as POST /entries takes it; default unchanged. |
task_idbody |
string |
Move the entry to this task (an id from GET /tasks); default unchanged. |
Example request
curl -X PATCH -H "Authorization: Bearer $KNORKY_API_KEY" -H "Content-Type: application/json" \ -d '{"timezone":"Europe/Berlin","note":"Call with the client"}' \ "https://api.knorky.com/api/v1/entries/<entry_id>"Example answer: The corrected entry and any warnings.
{ "entry": { "entry_id": "e2", "hm": "1:30", "minutes": 90, "task_id": "t1" }, "warnings": []}DELETE /entries/{entry_id}
Section titled “DELETE /entries/{entry_id}”Delete a finished entry, in every app. A running entry cannot be deleted.
| Field | Type | Description |
|---|---|---|
entry_idpath, required |
string |
The time entry (an id from GET /entries). |
timezonequery, required |
string |
The user’s IANA time zone, e.g. Europe/Berlin. |
Example request
curl -X DELETE -H "Authorization: Bearer $KNORKY_API_KEY" \ "https://api.knorky.com/api/v1/entries/<entry_id>?timezone=Europe/Berlin"Example answer: What was deleted and any warnings.
{ "deleted": { "entry_id": "e2", "task_id": "t1" }, "warnings": []}Reports
Section titled “Reports”GET /reports/totals
Section titled “GET /reports/totals”Tracked time between two dates (inclusive) in the given time zone, grouped by task, project (default), client or day.
| Field | Type | Description |
|---|---|---|
from_datequery, required |
string |
The first day, inclusive, as YYYY-MM-DD. |
timezonequery, required |
string |
The user’s IANA time zone, e.g. Europe/Berlin. |
to_datequery, required |
string |
The last day, inclusive, as YYYY-MM-DD; at most 366 days after from_date counted inclusively. |
group_byquery |
string |
"task", "project" (default), "client" or "day". |
project_idquery |
string |
Only time on tasks of this project (an id from GET /projects). |
task_idquery |
string |
Only time on this task (an id from GET /tasks). |
Example request
curl -H "Authorization: Bearer $KNORKY_API_KEY" \ "https://api.knorky.com/api/v1/reports/totals?from_date=2026-11-01&timezone=Europe/Berlin&to_date=2026-11-30"Example answer: The total and one row per group.
{ "from_date": "2026-10-01", "group_by": "project", "groups": [], "timezone": "Europe/Berlin", "to_date": "2026-10-31", "total_hm": "8:00", "total_minutes": 480}GET /reports/goals
Section titled “GET /reports/goals”Each client’s monthly goal against this month (or a month gone by): target, tracked, remaining, today’s share and this week’s target.
| Field | Type | Description |
|---|---|---|
timezonequery, required |
string |
The user’s IANA time zone, e.g. Europe/Berlin. |
client_idquery |
string |
Only this client (an id from GET /clients); default every non-archived client with goals. |
monthquery |
string |
A month gone by, as YYYY-MM, to see how it ended; default this month. |
week_startquery |
string |
The first day of the user’s week, "monday" (default) or "sunday", as set in the app. |
Example request
curl -H "Authorization: Bearer $KNORKY_API_KEY" \ "https://api.knorky.com/api/v1/reports/goals?timezone=Europe/Berlin"Example answer: One entry per goal.
{ "clients": [], "month": "2026-10", "timezone": "Europe/Berlin", "today": "2026-10-27"}GET /reports/earnings
Section titled “GET /reports/earnings”Money per client and month, as the app’s month report bills it; amounts in cents of the client’s currency.
| Field | Type | Description |
|---|---|---|
timezonequery, required |
string |
The user’s IANA time zone, e.g. Europe/Berlin. |
client_idquery |
string |
Only this client (an id from GET /clients). |
from_monthquery |
string |
The first month, as YYYY-MM; default this month. |
to_monthquery |
string |
The last month, inclusive, as YYYY-MM; default from_month. At most 24 months. |
Example request
curl -H "Authorization: Bearer $KNORKY_API_KEY" \ "https://api.knorky.com/api/v1/reports/earnings?timezone=Europe/Berlin"Example answer: One entry per client and month.
{ "from_month": "2026-10", "months": [], "timezone": "Europe/Berlin", "to_month": "2026-10"}Working days
Section titled “Working days”PUT /working-days/{date}
Section titled “PUT /working-days/{date}”Make a day (YYYY-MM-DD) a working day or a day off in the month plan, or give a working day its own time.
| Field | Type | Description |
|---|---|---|
datepath, required |
string |
The day, as YYYY-MM-DD. |
workingbody, required |
boolean |
true makes it a working day, false a day off. |
minutesbody |
integer |
The day’s own time in whole minutes (1 to 1440), only with working: true. The month plan then asks this day for exactly that and spreads the rest of the goal over the other working days. Leave it out to spread the goal over this day too, which also takes an own time away. |
Example request
curl -X PUT -H "Authorization: Bearer $KNORKY_API_KEY" -H "Content-Type: application/json" \ -d '{"working":false}' \ "https://api.knorky.com/api/v1/working-days/2026-12-24"Example answer: The day, whether it is a working day now, its own time, and whether that changed.
{ "changed": true, "date": "2026-12-24", "minutes": 240, "working": true}Coding agents’ work
Section titled “Coding agents’ work”POST /agent-work
Section titled “POST /agent-work”For a coding agent’s add-on: record the totals so far of one agent session on a task and day. Each counter only ever rises, so a report sent twice or late changes nothing. Not the user’s working time.
| Field | Type | Description |
|---|---|---|
agentbody, required |
string |
The agent’s key: lower-case letters, digits, ‘.’, ‘_’ or ‘-’, 1–40 characters, starting with a letter or digit, e.g. claude-code, codex. |
cache_read_tokensbody, required |
integer |
Tokens read from the prompt cache so far, 0 or more. |
cache_write_tokensbody, required |
integer |
Tokens written to the prompt cache so far, 0 or more. |
daybody, required |
string |
The day the work belongs to, as YYYY-MM-DD. |
input_tokensbody, required |
integer |
Input tokens so far, 0 or more. |
last_atbody, required |
string |
When it last did something, ISO 8601. |
output_tokensbody, required |
integer |
Output tokens so far, 0 or more. |
session_idbody, required |
string |
The agent’s id of the session, 1–200 characters. It must be unique across all sessions of that agent (use a UUID): two sessions sharing an id would count into the same rows. |
started_atbody, required |
string |
When the session’s work on this task and day began, ISO 8601. |
turnsbody, required |
integer |
Its turns so far, 0 or more. |
work_msbody, required |
integer |
Its working time so far in ms, 0 to 86 400 000. |
modelbody |
string |
The model the agent used last, e.g. claude-opus-4-5; none keeps the stored one. |
project_idbody |
string |
The project worked on (an id from GET /projects), when there is no task; a task’s own project wins over it. |
task_idbody |
string |
The task worked on (an id from GET /tasks); none for work on no task. |
Example request
curl -H "Authorization: Bearer $KNORKY_API_KEY" -H "Content-Type: application/json" \ -d '{"agent":"codex","cache_read_tokens":0,"cache_write_tokens":0,"day":"2026-11-05","input_tokens":1200,"last_at":"2026-11-05T09:10:00Z","output_tokens":800,"session_id":"5f0c1a7e-2b7d-4f3e-9b1a-0c6d8e2f4a10","started_at":"2026-11-05T09:00:00Z","turns":4,"work_ms":600000}' \ "https://api.knorky.com/api/v1/agent-work"Example answer: The row’s id and its working time and turns as stored now.
{ "id": "aw:claude-code:2026-10-30:t1:5f0c", "turns": 4, "work_ms": 600000}