# PATCH /time-entries/:entry_id

**Resource:** [TIME_ENTRIES](./time-entries.md)  
**MCP tool:** `update_time_entry`  
**Scopes:** `time-entries:write`  
**Write operation:** yes

Change a time entry: its start, its end or length, its note, whether it is billable, and what it is linked to (send an empty string to clear a link). Send only the fields to change. On a finished entry the length is worked out again when the times change. A person changes their own time; changing someone else's needs a workspace admin. Time that is already on an invoice is locked: only its note can change, and anything else is refused until it is removed from the invoice. Who did the work cannot be changed: delete the entry and log it again.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `entry_id` | path | string | yes | UUID of the time entry (from list_time_entries). |
| `started_at` | body | string | no | New start (ISO date-time). On a finished entry the length is worked out again. |
| `ended_at` | body | string | no | New end (ISO date-time). On a running timer this finishes it. Send this OR duration_minutes, not both. |
| `duration_minutes` | body | number | no | New length in minutes from the start (above 0, at most 1440). Send this OR ended_at, not both. |
| `note` | body | string | no | New note (2000 characters at most). Send an empty string to clear it. The only field that can change once the time is on an invoice. |
| `billable` | body | boolean | no | Whether the time can be invoiced. |
| `opportunity_id` | body | string | no | UUID of the opportunity the work was for (from list_opportunities). Needed before the time can be invoiced. Send an empty string to clear it. |
| `work_order_id` | body | string | no | UUID of the work order the work was done on. When no opportunity_id is sent, the work order's opportunity is used. Send an empty string to clear it. |
| `task_id` | body | string | no | UUID of the task the work was done on. When no opportunity_id is sent, the task's opportunity is used. Send an empty string to clear it. |
| `contact_id` | body | string | no | UUID of the contact the work was for. Send an empty string to clear it. |
| `product_id` | body | string | no | UUID of the labour product (from list_products) whose price is the hourly rate when this time is invoiced. Send an empty string to clear it. |
| `require_approval` | body | boolean | no | Optional. Set true to route this write into the approval queue for human review instead of executing it immediately (returns 202 + an approval_id). Works even when your key/token has permission to execute directly. |

## Request example

```bash
curl -X PATCH   "https://api.trustpager.com/functions/v1/api/v1/time-entries/:entry_id"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"started_at":"...","ended_at":"...","duration_minutes":"..."}'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`