Skip to content

Time tracking API

Log time on tasks, read and correct entries, and run timers. These endpoints use the same rules as time tracking in the app.

Session tokens accept the entry list with time:read, and entry edit, delete, single-entry duplication, and bulk duplication with time:write. Send Authorization: Bearer with X-Project-Feed-Workspace. Workspace and project viewers cannot write, including changes to their own entries. API keys follow the same rule. Edit and delete require the entry logger or a workspace owner or admin. Duplication accepts a visible source and creates an entry for the caller. Each write requires task and project write access. Edit and delete support If-Match but do not deduplicate by Idempotency-Key. Duplication stores a replay record for 24 hours when a key is supplied. Reuse that key and body on retries. If the response reports idempotency_outcome_unknown, stop retries and reconcile before creating another entry. For edit and delete, capture the entry updatedAt from the list and send it as a quoted If-Match version. Keep that version on retries. A 412 means the entry changed; read the list again and reconcile before another write. After a lost response, read the list to determine whether the edit or deletion completed.

Endpoints

Limits

An entry lasts 1 second to 24 hours, in whole seconds. Split longer work into several entries. An entry cannot be dated more than 5 minutes in the future or more than 2 years in the past, and a note is 500 characters or less. Request bodies are limited to 16 KB; larger ones return 413. A list returns up to 100 entries per page. See API conventions for cursors.

Whose time

Entries and timers belong to the key's user. A workspace API key acts as the member who created it, so it logs time and runs the timer for that member. A personal API token acts as you.

Anyone who can open a project can read every entry in it, the same as the project's time view. Without taskId or projectId, the list shows one person's entries: the key's user unless you pass userId, and only in projects the key's user can open. Your own entries in a project you can no longer open still appear, with task and project set to null.

Only the person who logged an entry, or a workspace owner or admin, can change or delete it. Others get 403. Viewers can read time but cannot log it.

Timers

Each person has one running timer across all workspaces. Starting a second one returns 409; stop the first timer, then start again. Stopping a timer logs its elapsed time as an entry with source timer, capped at 24 hours. Stopping when no timer is running in the workspace returns 409.

Send expectedTimerId from the timer read with stop or switch to avoid changing a replacement timer. The ID is checked in the same mutation as the write. A mismatch returns 409 with code conflict and changes nothing, including a switch to the task already being timed. Omitting the ID keeps the current behavior. These routes do not deduplicate by Idempotency-Key. After a lost response, read the timer and entries before deciding whether to retry. Never substitute a newly read timer ID into an old request without confirming the intended action.

Rollups and summaries

GET /tasks/:id/time adds up a task's own time, its direct subtasks, and the subtasks beneath those. truncated is true when a task has more subtasks than were counted, so the subtask totals are partial. contributors lists the people who logged time, up to a limit that contributorsTruncated reports.

A summary covers the last 30 days unless you pass from and to, and the range spans at most 90 days. It reads up to 5,000 entries; capped is true when more matched and the totals are partial. It lists up to 200 groups, and groupsTruncated reports when there were more. Groups come back in date order for day and largest first for the others. For a task or user group, task or user carries the details, and a task you cannot open is null.

Switching, duplicating, and bulk writes

The bulk and duplicate endpoints are all-or-nothing: if one entry fails validation or you cannot write to its task, nothing is logged. They log time for the key's user and apply the limits above to every entry. They accept an idempotency key, so a retry after a dropped connection returns the first result instead of logging the time again.

When time tracking is off

If a workspace admin turns time tracking off, these endpoints return 403 with the detail “Time tracking is turned off for this workspace.” Reading and stopping a timer that was already running still work, as they do in the app.

Webhooks, MCP, and CLI

Entries logged, edited, or deleted anywhere send time_entry.created, time_entry.updated, and time_entry.deleted webhooks. The hosted MCP server has matching time tools, and the CLI has pf time.

Image preview
100%