time-entries

Create Time Entry

Create a new time entry, optionally sourced from existing time blocks.

Returns the row in the cursor-sync wire shape (version, deleted_at, denormalized matter_segment) so the desktop client can apply the response directly to its local SQLite mirror via the same idempotent upsert path used by GET /api/v1/sync.

time_block_ids attaches those blocks to the new entry in the same transaction; the mutated blocks come back in attached_blocks so the client's activity feed stops drawing them as pending without waiting for the next sync round. The entry's own fields stay at the top level, so a client that models only TimeEntrySyncDto reads this response exactly as it read the old one.

post/v1/time-entries

Request

  • Base URL
    https://app.tokumalabs.com/api
  • Auth
    OAuth 2
    Password
    Token URL: v1/auth/token

Request body

datestring date required

The date for this entry

narrativestring required

Description of the work performed

legal_time_minutesinteger required

Legal time in minutes

activity_codestring nullable

Activity code for the work

segment_idstring nullable

Segment ID to associate with this time entry

is_billableboolean

Whether the time entry is billable

time_block_idsinteger[]

Unattached time blocks to attach to the new entry, in one transaction. Backs the desktop gesture that drops activity-feed blocks on the timesheet. A block that already belongs to a time entry is rejected: moving one between entries is what POST /v1/time-blocks/move is for, and it recalculates both sides. Empty (the default) creates an entry with no sources, which is what the plain Add-entry dialog does.

legal_time_pinnedboolean

Whether legal_time_minutes is a figure the user typed. True stores it, snapped to the matter's billing increment. False means the client merely pre-filled the box from the attached blocks and the user did not touch it: the entry is left with a computed legal time and keeps following its blocks as they move. Defaults to true — the behaviour every caller before this field had.

Response

Successful Response

idinteger required
organization_idstring required
user_idstring required
datestring date required
legal_time_minutesinteger required
legal_time_is_computedboolean required
tracked_duration_minutesinteger required
narrativestring nullable required
narrative_suggestionsstring[] nullable
activity_codestring nullable
segment_idstring nullable
is_billableboolean required
legal_time_pinnedboolean required
legal_time_resnapped_frominteger nullable
is_user_createdboolean required
created_atstring date-time required
updated_atstring date-time required
deleted_atstring date-time nullable
versioninteger required

Changes

No recorded changes to this operation across all 1 revision of this API.