[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Ftasks\u002Ftime\u002Fupdate":3,"docs-tabs-entities\u002Ftasks\u002Ftime\u002Fupdate":6},{"content":4,"lastmod":5},"\n## Update a time-tracking entry\n\n`PATCH \u002Fv1\u002Ftasks\u002F:taskId\u002Ftime\u002F:itemId`\n\nModifies an existing time-tracking entry. Pass only the fields you want to change.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `taskId` (path) | number | yes | Task ID. List: [`GET \u002Fv1\u002Ftasks`](\u002Fdocs\u002Fentities\u002Ftasks\u002Flist) |\n| `itemId` (path) | number | yes | Time-tracking entry ID. List: [`GET \u002Fv1\u002Ftasks\u002F:taskId\u002Ftime`](\u002Fdocs\u002Fentities\u002Ftasks\u002Ftime\u002Flist) |\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|---------|\n| `seconds` | number | no | New duration in seconds. After the update, `minutes` is recalculated automatically |\n| `comment` | string | no | New comment for the entry |\n| `createdDate` | string | no | New date and time of the entry. Three formats are accepted: ISO 8601 with offset `2026-07-13T14:30:00+00:00`, ISO 8601 without offset `2026-07-13T14:30:00`, and a date `2026-07-13` |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F289\u002Ftime\u002F161\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"seconds\": 900,\n    \"comment\": \"Refined estimate\"\n  }'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F289\u002Ftime\u002F161\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"seconds\": 900,\n    \"comment\": \"Refined estimate\"\n  }'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F289\u002Ftime\u002F161', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    seconds: 900,\n    comment: 'Refined estimate',\n  }),\n})\n\nconst { success, data } = await res.json()\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F289\u002Ftime\u002F161', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    seconds: 900,\n    comment: 'Refined estimate',\n  }),\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on a successful update |\n| `data.id` | number | ID of the updated entry. For the other fields, see [`GET \u002Fv1\u002Ftasks\u002F:taskId\u002Ftime\u002F:itemId`](.\u002Fget.md) |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": 161\n  }\n}\n```\n\n## Error response example\n\n404 — the entry was not found or is inaccessible:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"NOT_FOUND\",\n    \"message\": \"Time entry not found\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `READONLY_FIELD` | `userId` was passed — the entry's author cannot be changed (see \"Known specifics\") |\n| 400 | `INVALID_PARAMS` | `taskId` or `itemId` is not a positive integer |\n| 404 | `NOT_FOUND` | An entry with this `itemId` was not found or the parent task is inaccessible |\n| 403 | `SCOPE_DENIED` | The API key lacks the `task` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only — see [access rights](\u002Fdocs\u002Faccess-rights) |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**The update applies only `seconds`, `comment` and `createdDate`.** Other body fields are ignored: an empty body, or a body with only such fields, returns `200` and leaves the entry unchanged. The exception is `userId`: a request carrying it is refused entirely, and the `seconds` and `comment` sent alongside are not saved either. The author is fixed when the entry is created. To move tracked time to another employee, delete the entry and create a new one with the desired `userId`.\n\n## See also\n\n- [Get a time-tracking entry](.\u002Fget.md)\n- [List time-tracking entries](.\u002Flist.md)\n- [Add an entry](.\u002Fcreate.md)\n- [Delete a time-tracking entry](.\u002Fdelete.md)\n- [Tasks](\u002Fdocs\u002Fentities\u002Ftasks)\n","2026-10-09",{},1794739439415]