Create time log

Create time log in the credential-bound company. Idempotency-Key is required and stores the terminal response for safe retries for 24 hours. This changes draft or operational data without posting accounting entries. Requires the time-tracking:write OAuth scope.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Fields accepted to create time log. The schema identifies required and optional values.

Create (POST /time-logs) or sparsely update (PUT /time-logs/{id}) a task
time log.

DURATION. hours/minutes are ONE figure in two fields and travel as a
pair: both set is an explicit duration, neither set derives it from the
started_at–ended_at range, and exactly one is a 422 rather than a silent
zero for the missing half — the same rule the task modal's
{@see \App\Tenant\Project\Requests\UpsertProjectTaskTimeLogRequest} enforces,
because hours: null, minutes: 45 next to a three-hour block used to store
0h45m.

RANGE. A placement is stored as a PAIR or not at all: half of one would leave
the other end of an existing log in place and could invert it. started_at
and ended_at are tenant WALL time and are accepted in both wire forms — an
ISO-8601 instant (offset or Z) and the naive Y-m-d H:i:s string — through
{@see \App\Tenant\Project\Support\TimeLogWallTime}. Whether a range OVERLAPS
another log of the same author is NOT decided here: that invariant needs a
lock and a transaction, which a validator has neither of, so it lives in
{@see \App\Tenant\Project\Services\ProjectTaskTimeLogService}.

source IS NOT A FIELD and never will be — it records how a log was written,
so it is the write path's decision, never the client's. invoice_id and
invoiced_at are likewise absent: billing a log is the invoice endpoint's
act. The closed body turns any of them into an explicit rejection.

tag_ids is shape-checked here and OWNERSHIP-checked in the application
service, after the project is authorized. Validating "does this tag belong to

  • the project" at this layer would answer 422 for a foreign tag and 404 for the
    project — a caller with no access could enumerate another project's tag ids
    one at a time.

string
required

The task is the log's home and its only route to a project, so it
is required on create and PROHIBITED on update: moving a log to
another task would move it to another project's budget and
another customer's invoice.

string | null

On-behalf authorship. Allowed only with manage_project_time_logs,
which the application service enforces; prohibited on update
because reassigning who spent an hour is not an edit.

integer | null
0 to 99
integer | null
0 to 59
boolean
string | null
date-time
required
date-time | null
date-time | null
tag_ids
array of strings | null
tag_ids
Headers
string
required
length ≤ 191

Required unique key whose request hash and terminal response are stored durably for 24 hours.

Responses

Language
Credentials
OAuth2
Missing 1 required scope
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*