Deze referentie is alleen in het Engels. Naar het Nederlandse REST API-overzicht

Diese Referenz gibt es nur auf Englisch. Zur deutschen REST-API-Übersicht

Cette référence existe uniquement en anglais. Aller à la présentation de l'API REST en français

Esta referencia solo está en inglés. Ir a la introducción de la API REST en español

POST/worklogs

Log time

POSThttps://<your-url>/api/v2/worklogs

MCP id worklogs.storeAlso on this path: GET List worklogs

View as Markdown openapi.json

Books minutes against a project on one calendar day and returns the entry with a Location header.

Access

Token scope
api:write:times

Without it: 403 insufficient-token-scope.

Permission
None. The record's own rules still apply.
Rate cost
1 unit, write bucket. A write costs the same whatever view you ask for.
Also
Needs Idempotency-Key. Never cached: private, no-store. Unknown body keys are refused, never dropped.

Both are checked, scope first. A token never does more than its user. How access is checked

user_id is not accepted: the hours belong to the authenticated user unless on_behalf_of_user_id names someone else, and logging time for another user additionally requires times::update_others, enforced by that field. Every check inside the write (whether that person may log time on the project, owns the task and may log time on the work item) is evaluated against the person the hours are for, not against you, so is_overtime is dropped when they lack times::write_overtime even if you hold it. One exception, which plnnrly's own form shares: the check that project, task and budget fit together weighs the task against you, so filing hours on somebody else's task needs times::write_on_others_tasks from the caller as well. A task or work item that does not belong to the submitted project is a 422 on its own field; a task or work item you may read but may not book against is a 403. budget_id is derived from the task and never accepted. is_not_billable is inferred from the task when omitted; sending a value that differs from the inference requires billable_change_reason, answering 422 on /billable_change_reason without it. Sending a reason marks the entry as exceeding its budget whether or not exceeded_budget is sent alongside. Either an exceeded budget or a billability override puts the entry in a reviewer's queue, and while it sits there every write to it by anyone but its author or a reviewer answers 409. Idempotency-Key is required here: a retried time entry is real, invoiced damage. The API is stricter than plnnrly here: a task is accepted only if you can also see it on the tasks collection, so a caller holding times::write_on_others_tasks but not kanban::manage_for_others gets a 422 exists for a task plnnrly would accept.

Query parameters

Unknown parameters are refused with 400, naming the parameter.

viewstring

Which field set to render.

summarydetaildefault

Request headers

X-Request-Idstringpattern

A correlation id of your own. It is recorded in our logs next to the server's request id but never returned: the response header always carries the server's id. A value that does not match the pattern is discarded silently, never rejected.

Idempotency-Keystring≤ 255Required

A caller-chosen key that makes this POST safe to retry. Required on this operation: omitting it is 400 idempotency-key-required.

Request body

Unknown keys are refused with 422, naming the key.

project_idinteger → Project.idRequired

Project the hours are booked against; null once that project is deleted.

datedate (YYYY-MM-DD)Required

The calendar day the work happened.

minutesinteger1 to 1440Required

Duration in minutes, between 1 and 1440.

descriptionstring≤ 255Required

What the employee worked on.

task_idinteger or null → Task.id

Task the hours are booked on; null when the entry is not attached to one, or once that task is deleted.

work_item_idinteger or null → WorkItem.id

Work item the hours are attached to; null when the entry is not attached to one, or once that work item is deleted.

is_overtimeboolean

Whether the hours count as overtime. Sending it without the times::write_overtime permission leaves it false and adds an input_ignored warning rather than failing the write.

is_not_billableboolean

Whether these hours are excluded from invoicing. Inferred from the task's is_billable flag (false without a task) on create and again whenever task_id is sent. Sending a value that differs from the inferred or current one requires billable_change_reason and puts the entry in a reviewer's queue; without it the write is a 422 on /billable_change_reason.

billable_change_reasonstring or null≤ 65535

Why the inferred billability was overridden. Required whenever is_not_billable is sent with a value that differs from the inferred or current one, on create and on PATCH alike; the override puts the entry in a reviewer's queue, reopening one a reviewer had already settled.

exceeded_budgetboolean

Whether the entry was booked knowing it exceeds its budget. Set on create only, and true whenever a reason is sent; setting it puts the entry in a reviewer's queue.

reasonstring or null≤ 65535

Why the budget overrun was accepted. Sending it on create marks the entry as exceeding its budget. Once a reviewer has settled the entry it can no longer be changed: a PATCH that does answers 409 reason_reviewed.

on_behalf_of_user_idinteger → User.id

Write-only, on create only: the employee to file the hours for. Omit it to file them for yourself. Naming anyone else requires the times::update_others permission, and every check inside the write (whether that person may log on the project and on that task, and whether overtime may be recorded) is then evaluated against them, not against you.

Response 201

Returns a Time in the detail view.

Headers

ETag
A strong validator of exactly this representation.
Idempotency-Replayed
true when this response was replayed from a stored Idempotency-Key rather than produced by a new write.
Location
The absolute URL of the created or queued resource.
RateLimit
The IETF httpapi-ratelimit-headers form of your remaining allowance on the tightest bucket this request touched.
RateLimit-Policy
The ceiling and window of that bucket, as <limit>;w=<seconds>.
X-Request-Id
The server-generated ULID correlating this response with our logs.

Every response also carries Cache-Control, Vary, X-Content-Type-Options, X-Plnnrly-Api-Version, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset. Headers and versioning

Errors

7 errors every operation can return: 400, 401, 404, 406, 429, 500, 503

This path allows GET, POST. Anything else answers 405.