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
ParametertaskId (path) Typenumber Requiredyes DescriptionTask ID. List: GET /v1/tasks
ParameteritemId (path) Typenumber Requiredyes DescriptionTime-tracking entry ID. List: GET /v1/tasks/:taskId/time

Request fields (body)

Field Type Required Description
Fieldseconds Typenumber Requiredno DescriptionNew duration in seconds. After the update, minutes is recalculated automatically
Fieldcomment Typestring Requiredno DescriptionNew comment for the entry
FieldcreatedDate Typestring Requiredno DescriptionNew 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
Fieldsuccess Typeboolean DescriptionAlways true on a successful update
Fielddata.id Typenumber DescriptionID of the updated entry. For the other fields, see GET /v1/tasks/:taskId/time/:itemId

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
HTTP400 CodeREADONLY_FIELD DescriptionuserId was passed — the entry's author cannot be changed (see "Known specifics")
HTTP400 CodeINVALID_PARAMS DescriptiontaskId or itemId is not a positive integer
HTTP404 CodeNOT_FOUND DescriptionAn entry with this itemId was not found or the parent task is inaccessible
HTTP403 CodeSCOPE_DENIED DescriptionThe API key lacks the task scope
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key is read-only — see access rights
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens

Full list of common API errors — Errors.

Known specifics

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.

See also