[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fbooking-resources\u002Fdelete":3,"docs-tabs-entities\u002Fbooking-resources\u002Fdelete":6},{"content":4,"lastmod":5},"# Delete: Booking resources\n\n`DELETE \u002Fv1\u002Fbooking-resources\u002F:id`\n\nDeletes a booking resource that has no future bookings. 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 identifier. List: [`GET \u002Fv1\u002Fbooking-resources`](\u002Fdocs\u002Fentities\u002Fbooking-resources\u002Flist) |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbooking-resources\u002F51\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -w \"%{http_code}\\n\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbooking-resources\u002F51\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -w \"%{http_code}\\n\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbooking-resources\u002F51', {\n  method: 'DELETE',\n  headers: { 'X-Api-Key': 'YOUR_API_KEY' },\n})\n\nif (res.status === 204) {\n  console.log('Deleted')\n} else {\n  const { error } = await res.json()\n  console.log(error.code, error.message)\n}\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbooking-resources\u002F51', {\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} else {\n  const { error } = await res.json()\n  console.log(error.code, error.message)\n}\n```\n\n## Response\n\nOn successful deletion, the HTTP status is `204 No Content` with an empty body. The status code signals success, not the body.\n\n## Response example\n\n```\nHTTP\u002F1.1 204 No Content\n```\n\n## Error response example\n\n422 — the resource has future bookings:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ERROR\",\n    \"message\": \"The resource can not be deleted. There are future bookings with that resource.\",\n    \"b24Code\": \"1008\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 404 | `ENTITY_NOT_FOUND` | No resource with this `id` exists, including on a repeated deletion. Message `Booking record not found` |\n| 422 | `BITRIX_ERROR` | The resource has future bookings. Message `The resource can not be deleted. There are future bookings with that resource.`, `b24Code` `1008` |\n| 400 | `INVALID_PARAMS` | `id` is not a positive integer. Message `id must be a positive safe integer` |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is not passed |\n| 401 | `TOKEN_MISSING` | The key has no Bitrix24 tokens |\n| 403 | `SCOPE_DENIED` | The key does not have the `booking` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is in read-only mode |\n| 429 | `RATE_LIMITED` | Request rate exceeded. The effective cap is in the `x-ratelimit-limit` header |\n| 502 | `BITRIX_RESPONSE_INVALID` | Bitrix24 did not confirm the deletion |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**Future bookings are not deleted together with the resource.** While the resource has a booking in the future, deletion is refused with `422 BITRIX_ERROR`. First delete those bookings via [`DELETE \u002Fv1\u002Fbookings\u002F:id`](\u002Fdocs\u002Fentities\u002Fbookings\u002Fdelete), then delete the resource.\n\n## See also\n\n- [List booking resources](\u002Fdocs\u002Fentities\u002Fbooking-resources\u002Flist)\n- [Get a booking resource](\u002Fdocs\u002Fentities\u002Fbooking-resources\u002Fget)\n- [Bookings](\u002Fdocs\u002Fentities\u002Fbookings)\n- [Errors](\u002Fdocs\u002Ferrors)\n","2026-10-15",{},1795415178069]