[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Ftasks\u002Fdelete":3,"docs-tabs-entities\u002Ftasks\u002Fdelete":6},{"content":4,"lastmod":5},"\n## Delete task\n\n`DELETE \u002Fv1\u002Ftasks\u002F:id`\n\nDeletes a task. A deleted task cannot be restored via the API — create a new one if needed. Deleting the task also makes its comments and time-tracking entries inaccessible.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Task ID |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F3871\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F3871\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F3871', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nif (res.status === 204) {\n  console.log('Task deleted')\n}\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F3871', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nif (res.status === 204) {\n  console.log('Deleted')\n}\n```\n\n## Response\n\nOn successful deletion, HTTP status `204 No Content` is returned with an empty body — success is determined by the status.\n\n## Response example\n\n```\nHTTP\u002F1.1 204 No Content\n```\n\n## Error response example\n\n404 — task not found (or already deleted):\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"task 999999999 not found\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 404 | `ENTITY_NOT_FOUND` | A task with this ID was not found (including a task that has already been deleted) |\n| 403 | `SCOPE_DENIED` | The API key does not have the `tasks` scope |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n\nThe full list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**Cascade deletion of nested resources.** After a task is deleted, its comments and time-tracking entries become inaccessible — a separate `DELETE` for each of them is not needed. An attempt to access them by their previous ID returns `404`.\n\n## See also\n\n- [List tasks](.\u002Flist.md)\n- [Get task](.\u002Fget.md)\n- [Update task](.\u002Fupdate.md)\n- [Batch](\u002Fdocs\u002Fbatch)\n- [Limits and optimization](\u002Fdocs\u002Foptimization)\n","2026-09-22",{},1795000394622]