[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fcalendar-resources\u002Fdelete":3,"docs-tabs-entities\u002Fcalendar-resources\u002Fdelete":6},{"content":4,"lastmod":5},"\n## Delete calendar resource\n\n`DELETE \u002Fv1\u002Fcalendar-resources\u002F:id`\n\nDeletes a calendar resource by ID. A deleted resource cannot be restored through the API — create a new one if needed.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Resource ID. List: [`GET \u002Fv1\u002Fcalendar-resources`](.\u002Flist.md) |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcalendar-resources\u002F285\" \\\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\u002Fcalendar-resources\u002F285\" \\\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\u002Fcalendar-resources\u002F285', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\nif (success && data.deleted) {\n  console.log('Resource deleted:', data.id)\n}\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcalendar-resources\u002F285', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\nA successful deletion returns HTTP status `200 OK` with a body.\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data.id` | number | ID of the deleted resource |\n| `data.deleted` | boolean | `true` — the resource is deleted |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": 285,\n    \"deleted\": true\n  }\n}\n```\n\n## Error response example\n\n404 — no resource with this ID:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"Calendar record not found\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_PARAMS` | `id` is not a positive integer |\n| 400 | `FST_ERR_CTP_EMPTY_JSON_BODY` | The `Content-Type: application\u002Fjson` header is sent without a body. Send `DELETE` without this header |\n| 404 | `ENTITY_NOT_FOUND` | No resource with this `id` exists in the resource list, including when the same `id` is deleted again |\n| 422 | `BITRIX_ERROR` | Bitrix24 did not confirm the deletion |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The API key is in read-only mode — writes are forbidden |\n| 403 | `SCOPE_DENIED` | The API key does not have the `calendar` scope |\n| 403 | `BITRIX_ACCESS_DENIED` | Bitrix24 denied the key owner permission to delete the resource |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header was not passed |\n| 429 | `RATE_LIMITED` | Rate limit exceeded |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable or returned a malformed resource list |\n| 503 | `BITRIX_TIMEOUT` | Bitrix24 did not respond in time |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**No batch deletion.** `POST \u002Fv1\u002Fcalendar-resources\u002Fbatch` with the `delete` action is rejected with `400 ACTION_NOT_SUPPORTED`. Delete each resource with a separate call to this method.\n\n## See also\n\n- [List calendar resources](.\u002Flist.md)\n- [Create calendar resource](.\u002Fcreate.md)\n- [Resource bookings](.\u002Fbookings.md)\n- [Calendar resources](\u002Fdocs\u002Fentities\u002Fcalendar-resources)\n","2026-10-13",{},1795415185247]