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 no New duration in seconds. After the update, minutes is recalculated automatically
comment string no New comment for the entry
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

Examples

curl — personal key

Terminal
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

Terminal
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

javascript
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

javascript
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

JSON
{
  "success": true,
  "data": {
    "id": 161
  }
}

Error response example

404 — the entry was not found or is inaccessible:

JSON
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Time entry not found"
  }
}

Errors

HTTP Code Description
400 READONLY_FIELD userId was passed — the entry's author cannot be changed (see "Known specifics")
404 NOT_FOUND 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. The update accepts only seconds, comment and the creation date. Any other field, userId included, makes the entire request fail — along with the seconds and comment sent in it. 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