# Update Time Entry

`lawmatics_update-time-entry` · Lawmatics MCP tool · Time Entries

Update a time entry in Lawmatics by ID. The API requires exactly one of matterId or contactId on EVERY update — to keep the current association, fetch the entry with get-time-entry and pass its relationships.contactable.id as matterId when that pointer's type is "prospect" or as contactId when it is "contact". Other omitted fields keep their stored values; duration is in hours and the hourly rate is in integer cents. Returns the updated entry including a `relationships` envelope of {id,type} pointers to related records (the matter or contact the time is billed to, the staff and creating users, the billing activity type, and the invoice). WARNING: contact-targeted updates can return a server error AFTER the change was saved — on an upstream error, re-fetch the entry to check before retrying.

## Input

- **timeEntryId** `string` (required, pattern: ^\d+$) — ID of the time entry to update; a numeric string
- **description** `string` — New description of the work performed
- **duration** `number` — Duration in hours as a float (e.g. 1.5 = 1 hour 30 minutes), NOT minutes
- **billable** `boolean` — Whether the time is billable
- **rateCents** `integer` — Hourly rate in integer cents (e.g. 12000 = $120.00/hr), NOT dollars
- **rateFlatFee** `boolean` — Whether this is a flat-fee entry
- **showFlatFeeDuration** `boolean` — Whether to show the client the duration for a flat-fee entry
- **startedAt** `string(date-time)` (pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z||([+-](?:[01]\d|2[0-3]):[0-5]\d)))$) — When the time entry started, as an ISO 8601 timestamp (e.g. "2026-06-05T10:00:00-07:00"). Unix epoch values are NOT accepted.
- **completedAt** `string(date-time)` (pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z||([+-](?:[01]\d|2[0-3]):[0-5]\d)))$) — When the time entry completed, as an ISO 8601 timestamp (e.g. "2026-06-05T10:30:00-07:00"). Unix epoch values are NOT accepted. Only completed entries can be added to invoices.
- **activityTypeId** `string` — ID of the billing activity type
- **userId** `string` — ID of the user who performed the time entry
- **createdById** `string` — ID of the user who created the time entry
- **invoiceId** `string` — ID of the invoice to attach this entry to
- **matterId** `string` — ID of the matter this time entry belongs to. The API requires exactly one of matterId or contactId on EVERY update — pass the entry's current matter to keep it (get-time-entry returns it as relationships.contactable.id when that pointer's type is "prospect"), or a different one to re-associate.
- **contactId** `string` — ID of the contact this time entry belongs to. The API requires exactly one of matterId or contactId on EVERY update — pass the entry's current contact to keep it (get-time-entry returns it as relationships.contactable.id when that pointer's type is "contact"), or a different one to re-associate.

## Output

- **id** `string` (required) — Unique ID of the time entry
- **description** `string | null` (required) — Description of the work performed; null if unset
- **duration** `number` (required) — Duration in hours as a float (e.g. 1.5 = 1 hour 30 minutes), NOT minutes
- **durationRounded** `number | null` (required) — Duration rounded to the firm's billing increment, in hours; null if not reported
- **billable** `boolean | null` (required) — Whether the time is billable; null if not reported
- **rateFlatFee** `boolean | null` (required) — Whether this is a flat-fee entry; null if not reported
- **rateCents** `integer | null` (required) — Hourly rate in integer cents (e.g. 12000 = $120.00/hr); null if not reported
- **rateCurrency** `string | null` (required) — ISO currency code of the rate (e.g. "USD"); null if not reported
- **runningSince** `string | null` (required) — When the entry's live timer started, as an ISO 8601 timestamp; null when no timer is running
- **startedAt** `string | null` (required) — When the time entry started, as an ISO 8601 timestamp; null if unset
- **completedAt** `string | null` (required) — When the time entry completed, as an ISO 8601 timestamp; null while incomplete (only completed entries can be added to invoices)
- **createdAt** `string | null` (required) — When the time entry record was created, as an ISO 8601 timestamp; null if unknown
- **updatedAt** `string | null` (required) — When the time entry record was last updated, as an ISO 8601 timestamp; null if unknown
- **relationships** `object` (required) — JSON:API relationship pointers to related records as {id,type} stubs. Not materialized — follow a pointer by calling that resource's own get/find tool (e.g. type 'user' -> get-user, type 'prospect' -> get-matter, type 'contact' -> get-contact, type 'invoice' -> get-invoice).
  - **activityType** `object | null` (required) — Billing activity type pointer; null when unset
    - **id** `string` (required) — ID of the referenced Lawmatics record
    - **type** `string` (required) — JSON:API record class of the reference (e.g. "user", "contact", "prospect", "firm"); resolve it by calling that resource's own get/find tool — this pointer is not materialized
  - **contactable** `object | null` (required) — Pointer to the record the time is billed to; type is "prospect" for a matter or "contact" for a contact; null when unassociated
    - **id** `string` (required) — ID of the referenced Lawmatics record
    - **type** `string` (required) — JSON:API record class of the reference (e.g. "user", "contact", "prospect", "firm"); resolve it by calling that resource's own get/find tool — this pointer is not materialized
  - **createdBy** `object | null` (required) — Pointer to the user who created the record; null when unattributed
    - **id** `string` (required) — ID of the referenced Lawmatics record
    - **type** `string` (required) — JSON:API record class of the reference (e.g. "user", "contact", "prospect", "firm"); resolve it by calling that resource's own get/find tool — this pointer is not materialized
  - **invoice** `object | null` (required) — Pointer to the invoice this entry is attached to; null when not invoiced
    - **id** `string` (required) — ID of the referenced Lawmatics record
    - **type** `string` (required) — JSON:API record class of the reference (e.g. "user", "contact", "prospect", "firm"); resolve it by calling that resource's own get/find tool — this pointer is not materialized
  - **staff** `object | null` (required) — Pointer to the user who performed the time entry; null when unattributed
    - **id** `string` (required) — ID of the referenced Lawmatics record
    - **type** `string` (required) — JSON:API record class of the reference (e.g. "user", "contact", "prospect", "firm"); resolve it by calling that resource's own get/find tool — this pointer is not materialized
