[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Ftasks\u002Fchecklist-actions\u002Fattachments-remove":3,"docs-tabs-entities\u002Ftasks\u002Fchecklist-actions\u002Fattachments-remove":6},{"content":4,"lastmod":5},"## Remove checklist item attachments\n\n`POST \u002Fv1\u002Ftasks\u002F:taskId\u002Fchecklist\u002F:itemId\u002Fattachments\u002Fremove`\n\nRemoves attachments from a task checklist item — files attached by content or from Bitrix24 Drive.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|----------|\n| `taskId` (path) | number | yes | Task ID. List: [`GET \u002Fv1\u002Ftasks`](\u002Fdocs\u002Fentities\u002Ftasks\u002Flist) |\n| `itemId` (path) | number | yes | Checklist item ID. List of items: [`GET \u002Fv1\u002Ftasks\u002F:taskId\u002Fchecklist`](\u002Fdocs\u002Fentities\u002Ftasks\u002Fchecklist\u002Flist) |\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|----------|\n| `attachmentsIds` | array | yes | Attachment IDs — numbers. An attachment ID is a key of the item's `attachments` object, not a Drive file ID. List: [`GET \u002Fv1\u002Ftasks\u002F:taskId\u002Fchecklist\u002F:itemId`](\u002Fdocs\u002Fentities\u002Ftasks\u002Fchecklist\u002Fget) |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F4218\u002Fchecklist\u002F276\u002Fattachments\u002Fremove\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"attachmentsIds\":[592]}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F4218\u002Fchecklist\u002F276\u002Fattachments\u002Fremove\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"attachmentsIds\":[592]}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F4218\u002Fchecklist\u002F276\u002Fattachments\u002Fremove', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ attachmentsIds: [592] }),\n})\n\nconst { success, data } = await res.json()\nconsole.log('Attachments left:', Object.keys(data?.checkListItem?.attachments ?? {}).length)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F4218\u002Fchecklist\u002F276\u002Fattachments\u002Fremove', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ attachmentsIds: [592] }),\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | `true` if the request succeeded |\n| `data.checkListItem` | object | The checklist item after the attachments were removed |\n| `data.checkListItem.id` | number | Item ID |\n| `data.checkListItem.copiedId` | number \\| null | ID of the item this one was copied from. `null` — the item was not copied |\n| `data.checkListItem.userId` | number | ID of the user on whose behalf the call is made |\n| `data.checkListItem.createdBy` | number | ID of the item author. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `data.checkListItem.parentId` | number | Parent item ID. `0` — a top-level item |\n| `data.checkListItem.title` | string | Item text |\n| `data.checkListItem.sortIndex` | number | Position of the item among items with the same parent: the lower the number, the higher the item |\n| `data.checkListItem.displaySortIndex` | string | Item number for display. An empty string in this method's response |\n| `data.checkListItem.isComplete` | boolean | Whether the item is completed |\n| `data.checkListItem.isImportant` | boolean | Whether the item is marked as important |\n| `data.checkListItem.completedCount` | number | Number of completed sub-items. `0` in this method's response |\n| `data.checkListItem.members` | array | Item members — objects with the fields `id`, `type`, `name`, `personalPhoto`, `personalGender`, `image`, `isCollaber`. `id` is the user ID as a string; `type`: `A` — participant, `U` — observer |\n| `data.checkListItem.attachments` | array \\| object | Attachments the item still has. An empty array — no attachments are left. Otherwise an object where the key is the attachment ID and the value is the Drive file ID prefixed with the letter `n` |\n| `data.checkListItem.nodeId` | null | Node key from [saving the checklist](\u002Fdocs\u002Fentities\u002Ftasks\u002Fchecklist-actions\u002Ftree). `null` in this method's response |\n| `data.checkListItem.taskId` | number | Task ID |\n\n## Response example\n\nAttachment `592` is removed, and the item still has attachment `594`:\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"checkListItem\": {\n      \"id\": 276,\n      \"copiedId\": null,\n      \"userId\": 1295,\n      \"createdBy\": 1295,\n      \"parentId\": 268,\n      \"title\": \"Check the build\",\n      \"sortIndex\": 1,\n      \"displaySortIndex\": \"\",\n      \"isComplete\": true,\n      \"isImportant\": true,\n      \"completedCount\": 0,\n      \"members\": [\n        {\n          \"id\": \"1295\",\n          \"type\": \"U\",\n          \"name\": \"John Smith\",\n          \"personalPhoto\": \"33093\",\n          \"personalGender\": \"\",\n          \"image\": \"https:\u002F\u002Fexample.bitrix24.com\u002F...\",\n          \"isCollaber\": false\n        }\n      ],\n      \"attachments\": {\n        \"594\": \"n10806\"\n      },\n      \"nodeId\": null,\n      \"taskId\": 4218\n    }\n  }\n}\n```\n\n## Error response example\n\n400 — `attachmentsIds` is not an array:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_PARAMS\",\n    \"message\": \"attachmentsIds must be an array\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 400 | `INVALID_PARAMS` | `taskId` is not a positive integer. Message `taskId must be a positive integer` |\n| 400 | `INVALID_PARAMS` | `itemId` is not a positive integer. Message `itemId must be a positive integer` |\n| 400 | `INVALID_PARAMS` | The body is missing or is not a JSON object. Message `JSON object body is required` |\n| 400 | `INVALID_PARAMS` | `attachmentsIds` is missing or is not an array. Message `attachmentsIds must be an array` |\n| 401 | `MISSING_API_KEY` | `X-Api-Key` is missing |\n| 401 | `TOKEN_MISSING` | The key has no Bitrix24 tokens |\n| 403 | `SCOPE_DENIED` | The key lacks the `task` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is in read-only mode. `error.details.switchUrl` contains the URL of the section where the mode is changed |\n| 415 | `FST_ERR_CTP_INVALID_MEDIA_TYPE` | A body with a `Content-Type` the API does not parse, for example `application\u002Fxml` |\n| 404 | `TASK_NOT_FOUND` | The task is missing or inaccessible and the core returned the legacy named task-not-found signature |\n| 404 | `NOT_FOUND` | The `itemId` item is missing, belongs to another task or is inaccessible. This also covers an unnamed task access denial in Russian, English, German or Kazakh; this denial does not distinguish a missing task from denied access |\n| 422 | `BITRIX_ERROR` | Another Bitrix24 error, including an unrecognized core denial |\n| 429 | `RATE_LIMITED` | Request rate exceeded. The effective cap is in the `x-ratelimit-limit` header |\n\nThe full list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**An unknown ID does not cause an error.** If the item has no attachment with the passed ID, the method returns `200` and leaves the attachments unchanged. Check `attachments` in the response to confirm the result.\n\n**The Drive file is not always deleted.** The file of an attachment created [by content](\u002Fdocs\u002Fentities\u002Ftasks\u002Fchecklist-actions\u002Fattachments-content) disappears from Drive after the attachment is removed: [`GET \u002Fv1\u002Ffiles\u002F:id`](\u002Fdocs\u002Fentities\u002Ffiles\u002Fget) returns `404` for it. A file attached [from Drive](\u002Fdocs\u002Fentities\u002Ftasks\u002Fchecklist-actions\u002Fattachments-disk) stays in place.\n\n## See also\n\n- [Checklist actions and task file](\u002Fdocs\u002Fentities\u002Ftasks\u002Fchecklist-actions)\n- [Attach a file to a checklist item by content](\u002Fdocs\u002Fentities\u002Ftasks\u002Fchecklist-actions\u002Fattachments-content)\n- [Attach Drive files to a checklist item](\u002Fdocs\u002Fentities\u002Ftasks\u002Fchecklist-actions\u002Fattachments-disk)\n- [Get a checklist item](\u002Fdocs\u002Fentities\u002Ftasks\u002Fchecklist\u002Fget)\n- [Tasks](\u002Fdocs\u002Fentities\u002Ftasks)\n","2026-11-12",{},1795376993056]