For AI agents: markdown of this page — /docs-content-en/entities/tasks/time/update.md documentation index — /llms.txt
Update a time-tracking entry
PATCH /v1/tasks/:taskId/time/:itemId
Modifies an existing time-tracking entry. Pass only the fields you want to change.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
taskId (path) |
number | yes | Task ID |
itemId (path) |
number | yes | Time-tracking entry ID |
Request fields (body)
| Field | Type | Required | Description |
|---|---|---|---|
seconds |
number | New duration in seconds. After the update, MINUTES is recalculated automatically |
|
comment |
string | New comment for the entry | |
createdDate |
string | 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 |
Examples
curl — personal key
curl -X PATCH "https://vibecode.bitrix24.com/v1/tasks/289/time/161" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"seconds": 900,
"comment": "Refined estimate"
}'
curl — OAuth application
curl -X PATCH "https://vibecode.bitrix24.com/v1/tasks/289/time/161" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"seconds": 900,
"comment": "Refined estimate"
}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/tasks/289/time/161', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
seconds: 900,
comment: 'Refined estimate',
}),
})
const { success, data } = await res.json()
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/tasks/289/time/161', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
seconds: 900,
comment: 'Refined estimate',
}),
})
const { success, data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
success |
boolean | Always true on a successful update |
data.id |
number | ID of the updated entry |
Response example
{
"success": true,
"data": {
"id": 161
}
}
Error response example
422 — the entry was not found or is inaccessible:
{
"success": false,
"error": {
"code": "BITRIX_ERROR",
"message": "TASKS_ERROR_EXCEPTION_#512; Check listitem not found or not accessible; 512/TE/ITEM_NOT_FOUND_OR_NOT_ACCESSIBLE"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 400 | READONLY_FIELD |
userId was passed — the entry's author cannot be changed (see "Known specifics") |
| 422 | BITRIX_ERROR |
An entry with this itemId was not found or the parent task is inaccessible |
| 403 | SCOPE_DENIED |
The API key lacks the task scope |
| 401 | TOKEN_MISSING |
The API key has no configured tokens |
Full list of common API errors — Errors.
Known specifics
The author (userId) cannot be changed. Bitrix24's task.elapseditem.update accepts only seconds, comment and the date; any other field, userId included, makes it reject the whole call (256/TE/WRONG_ARGUMENTS), discarding the seconds/comment passed in the same request too. So userId in PATCH is rejected up-front with 400 READONLY_FIELD. The author is fixed when the entry is created. To "reassign" tracked time, delete the entry and create a new one with the desired userId.
The response contains only id, without the other fields. To read the updated entry with all fields, call GET /v1/tasks/:taskId/time/:itemId.
See also
- Get an entry — read the entry after the update
- List entries — all entries of a task
- Add an entry — create a new one
- Delete an entry — remove an entry
- Tasks — parent entity