#Update task

PATCH /v1/tasks/:id

Updates fields of an existing task. Pass only the fields you want to change. Full list — Task fields.

#Parameters

Parameter Type Req. Description
id (path) number yes Task ID

#Request fields (body)

Pass only the fields you want to change — PATCH behavior, other values are untouched.

Field Type Description
title string Title
description string Task description (supports BB-code)
responsibleId number New responsible person. Employee list: GET /v1/users
status number Task status. Full value list: GET /v1/tasks/fieldsfields.status.enum
priority number Priority: 0 — low, 1 — normal, 2 — high
deadline datetime Deadline (ISO 8601)
startDatePlan datetime Planned start date
endDatePlan datetime Planned end date
timeEstimate number Effort estimate in seconds
groupId number Workgroup. List: GET /v1/workgroups
parentId number Parent task. List: GET /v1/tasks
accomplices number[] Collaborators. Employee list: GET /v1/users
auditors number[] Watchers. Employee list: GET /v1/users
tags string[] Task tags

The fields id, createdDate, changedDate, closedDate are read-only and are not passed in the body. The createdBy field (creator) is set on create only (`POST /v1/tasks`) — it is rejected on PATCH. An attempt → 400 READONLY_FIELD.

#Frequently updated fields

Field When used
status Closing (5), returning to work (3), declining (7). Decoding: GET /v1/tasks/fieldsfields.status.enum
responsibleId Handing the task to another employee. Source: GET /v1/users
deadline Rescheduling the deadline (ISO 8601 with the portal timezone offset)

#Examples

#curl — personal key

Terminal
curl -X PATCH "https://vibecode.bitrix24.com/v1/tasks/3871" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": 5,
    "priority": 2
  }'

#curl — OAuth application

Terminal
curl -X PATCH "https://vibecode.bitrix24.com/v1/tasks/3871" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "status": 5,
    "priority": 2
  }'

#JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/tasks/3871', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    status: 5,
    priority: 2,
  }),
})

const { success, data } = await res.json()

#JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/tasks/3871', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    status: 5,
    priority: 2,
  }),
})

const { success, data } = await res.json()

#Response fields

Field Type Description
success boolean Always true on success
data object The updated task object with all fields — see Task fields

#Response example

JSON
{
  "success": true,
  "data": {
    "id": "3871",
    "title": "Prepare the quarterly report",
    "status": "5",
    "priority": "2",
    "responsibleId": "1",
    "createdBy": "1",
    "createdDate": "2026-05-12T11:46:12+03:00",
    "changedDate": "2026-05-12T13:02:48+03:00",
    "closedDate": "2026-05-12T13:02:48+03:00",
    "deadline": "2026-05-19T18:00:00+03:00",
    "accomplices": [],
    "auditors": []
  }
}

#Error response example

400 — attempt to change a read-only field:

JSON
{
  "success": false,
  "error": {
    "code": "READONLY_FIELD",
    "message": "Field 'createdDate' is read-only and cannot be set"
  }
}

#Errors

HTTP Code Description
404 ENTITY_NOT_FOUND A task with this ID was not found
400 READONLY_FIELD An attempt to update a read-only field (id, createdDate, changedDate, closedDate) or createdBy (settable on create only)
400 BITRIX_ERROR An invalid field value (for example, status outside the 1..7 range)
403 SCOPE_DENIED The API key does not have the tasks scope
401 TOKEN_MISSING The API key has no configured tokens

The full list of common API errors — Errors.

#Known specifics

Closing a task. To mark a task as done, send status: 5. After that, closedDate is filled in automatically — this field is read-only and is updated only on transition to status 5 (completed) or 6 (deferred).

#See also