For AI agents: markdown of this page — /docs-content-en/entities/tasks/checklist-actions/complete-all.md documentation index — /llms.txt

Mark an item complete with its sub-items

POST /v1/tasks/:taskId/checklist/:itemId/complete-all

Marks a task checklist item complete together with all its sub-items in one call. A top-level item is the checklist name, and marking it complete closes the whole checklist.

Parameters

Parameter Type Required Description
ParametertaskId (path) Typenumber Requiredyes DescriptionTask ID, a positive integer. List: GET /v1/tasks
ParameteritemId (path) Typenumber Requiredyes DescriptionItem ID, a positive integer. List: GET /v1/tasks/:taskId/checklist

No request body is needed.

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/tasks/4218/checklist/268/complete-all" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/tasks/4218/checklist/268/complete-all" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/tasks/4218/checklist/268/complete-all', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
console.log('Items marked:', data?.length)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/tasks/4218/checklist/268/complete-all', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

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

Response fields

Field Type Description
Fieldsuccess Typeboolean Descriptiontrue if the request succeeded
Fielddata Typearray DescriptionItems marked complete: sub-items first, the itemId item itself last. For an item without sub-items, the array contains just that item
Fielddata[].id Typenumber DescriptionItem ID
Fielddata[].taskId Typenumber DescriptionTask ID
Fielddata[].parentId Typenumber DescriptionParent item ID. 0 means a top-level item, which is also the checklist name
Fielddata[].title Typestring DescriptionItem text
Fielddata[].sortIndex Typenumber DescriptionPosition of the item among items with the same parent. The smaller the value, the higher the item
Fielddata[].displaySortIndex Typestring DescriptionDisplay number of the item. An empty string in the response
Fielddata[].isComplete Typeboolean DescriptionWhether the item is complete. After the call, it is true for every item in the array
Fielddata[].isImportant Typeboolean DescriptionWhether the item is marked important
Fielddata[].completedCount Typenumber DescriptionArrives as 0 even when sub-items are complete. A sub-item's own isComplete shows whether it is complete
Fielddata[].members Typearray DescriptionItem members. An empty array if there are none. Member roles — see key fields
Fielddata[].attachments Typearray | object DescriptionItem attachments. An empty array if there are none. Object format — see key fields
Fielddata[].createdBy Typenumber DescriptionItem author ID. List: GET /v1/users
Fielddata[].userId Typenumber DescriptionID of the employee on whose behalf the call is made. List: GET /v1/users
Fielddata[].copiedId Typenumber | null DescriptionID of the source item if the item was created by copying. Otherwise null
Fielddata[].nodeId Typestring | null DescriptionInternal node key. null in the response

Response example

A top-level item with two sub-items is marked complete:

JSON
{
  "success": true,
  "data": [
    {
      "id": 276,
      "copiedId": null,
      "userId": 1295,
      "createdBy": 1295,
      "parentId": 268,
      "title": "Check the build",
      "sortIndex": 1,
      "displaySortIndex": "",
      "isComplete": true,
      "isImportant": true,
      "completedCount": 0,
      "members": [],
      "attachments": [],
      "nodeId": null,
      "taskId": 4218
    },
    {
      "id": 274,
      "copiedId": null,
      "userId": 1295,
      "createdBy": 1295,
      "parentId": 268,
      "title": "Agree on the date",
      "sortIndex": 2,
      "displaySortIndex": "",
      "isComplete": true,
      "isImportant": false,
      "completedCount": 0,
      "members": [],
      "attachments": [],
      "nodeId": null,
      "taskId": 4218
    },
    {
      "id": 268,
      "copiedId": null,
      "userId": 1295,
      "createdBy": 1295,
      "parentId": 0,
      "title": "Launch preparation",
      "sortIndex": 0,
      "displaySortIndex": "",
      "isComplete": true,
      "isImportant": false,
      "completedCount": 0,
      "members": [],
      "attachments": [],
      "nodeId": null,
      "taskId": 4218
    }
  ]
}

Error response example

422 — no item with this itemId:

JSON
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "Access to task was denied",
    "b24Code": "0"
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptiontaskId is not a positive integer. Message taskId must be a positive integer
HTTP400 CodeINVALID_PARAMS DescriptionitemId is not a positive integer. Message itemId must be a positive integer
HTTP400 CodeFST_ERR_CTP_EMPTY_JSON_BODY DescriptionThe Content-Type: application/json header is passed with an empty body. Call the method without this header
HTTP401 CodeMISSING_API_KEY DescriptionX-Api-Key is not passed
HTTP401 CodeTOKEN_MISSING DescriptionThe key has no Bitrix24 tokens
HTTP403 CodeSCOPE_DENIED DescriptionThe key lacks the task scope
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key is in read-only mode. error.details.switchUrl contains the URL of the section where the mode is changed
HTTP415 CodeFST_ERR_CTP_INVALID_MEDIA_TYPE DescriptionA body with a Content-Type the API does not parse, such as application/xml
HTTP422 CodeBITRIX_ERROR DescriptionThe task or item does not exist, or the employee on whose behalf the call is made cannot see the task. The message is in the Bitrix24 account language; on an English-language account it is Access to task was denied. The API specification declares 404 TASK_NOT_FOUND and 404 NOT_FOUND for this case, but the Bitrix24 accounts we tested return this response instead
HTTP429 CodeRATE_LIMITED DescriptionRequest rate exceeded. The effective cap is in the x-ratelimit-limit header

Full list of common API errors — Errors.

Known specifics

A repeated call returns no error. If the item and its sub-items are already complete, the method again returns 200 with the same array of items.

See also