For AI agents: markdown of this page — /docs-content-en/entities/calendar-resources/delete.md documentation index — /llms.txt

Delete calendar resource

DELETE /v1/calendar-resources/:id

Deletes a calendar resource by ID. A deleted resource cannot be restored through the API — create a new one if needed.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionResource ID. List: GET /v1/calendar-resources

Examples

curl — personal key

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/calendar-resources/285" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/calendar-resources/285" \
  -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/calendar-resources/285', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
if (success && data.deleted) {
  console.log('Resource deleted:', data.id)
}

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/calendar-resources/285', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

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

Response fields

A successful deletion returns HTTP status 200 OK with a body.

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata.id Typenumber DescriptionID of the deleted resource
Fielddata.deleted Typeboolean Descriptiontrue — the resource is deleted

Response example

JSON
{
  "success": true,
  "data": {
    "id": 285,
    "deleted": true
  }
}

Error response example

404 — no resource with this ID:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Calendar record not found"
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS Descriptionid is not a positive integer
HTTP400 CodeFST_ERR_CTP_EMPTY_JSON_BODY DescriptionThe Content-Type: application/json header is sent without a body. Send DELETE without this header
HTTP404 CodeENTITY_NOT_FOUND DescriptionNo resource with this id exists in the resource list, including when the same id is deleted again
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 did not confirm the deletion
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe API key is in read-only mode — writes are forbidden
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the calendar scope
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionBitrix24 denied the key owner permission to delete the resource
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header was not passed
HTTP429 CodeRATE_LIMITED DescriptionRate limit exceeded
HTTP502 CodeBITRIX_UNAVAILABLE DescriptionBitrix24 is unavailable or returned a malformed resource list
HTTP503 CodeBITRIX_TIMEOUT DescriptionBitrix24 did not respond in time

Full list of common API errors — Errors.

Known specifics

No batch deletion. POST /v1/calendar-resources/batch with the delete action is rejected with 400 ACTION_NOT_SUPPORTED. Delete each resource with a separate call to this method.

See also