Time Entries API
POST/api/v1/stopwatch/{id}/log
Product availabilityAlgaPSA

Log stopwatch as time entry

Logs the session as exactly one time entry: start = first segment start (to the minute), end = start + active duration, billable_duration = active minutes (min 1). Any body field overrides the derived value. The time sheet is resolved server-side from the start date; a locked (submitted/approved) sheet returns 409 and the session is left untouched.

RBAC · time_entry

Path parameters

idstring <uuid>Required
UUID path identifier from underlying resource tables.

Request body

Content type: application/json · schema WorkV1StopwatchLogBody

start_timestring <date-time>
end_timestring <date-time>
billable_durationinteger
≥ 0
is_billableboolean
notesstring
service_idstring <uuid>

Response body

Success response 201 · schema WorkV1StopwatchLogResponse

dataobjectRequired
sessionobjectRequired
session_idstring <uuid>Required
user_idstring <uuid>Required
work_item_typestringRequired
work_item_idstring <uuid>RequiredNullable
service_idstring <uuid>RequiredNullable
notesstringRequired
statusstringRequired
Enum: runningpausedloggeddiscarded
time_entry_idstring <uuid>RequiredNullable
closed_atstring <date-time>RequiredNullable
created_atstring <date-time>Required
updated_atstring <date-time>Required
segmentsarray of objectRequired
itemsobject
segment_idstring <uuid>Required
started_atstring <date-time>Required
ended_atstring <date-time>RequiredNullable
Null while the segment is open (the stopwatch is running).
active_msnumberRequired
Active (non-paused) milliseconds as of server_now.
server_nowstring <date-time>Required
Server clock at the moment the response was built; derive a clock offset from it.
ticket_numberstringRequiredNullable
work_item_titlestringRequiredNullable
project_namestringRequiredNullable
client_namestringRequiredNullable
service_namestringRequiredNullable
time_entryobjectRequired
The persisted time entry.

Response codes

201
Session logged.
400
Validation failure (e.g. no service, no time period covers the date).
401
API key missing/invalid or associated user missing.
403
Permission denied (time_entry:create for mutations, time_entry:read for reads).
404
Stopwatch session not found (or it belongs to another user).
409
Session already closed, or the target time sheet is locked (details.reason is the message key).
500
Unexpected failure.