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

Remove booking clients

DELETE /v1/bookings/:id/clients

Removes all clients from the booking in one call. The contacts and companies stay in CRM.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionBooking ID. List: GET /v1/bookings

Examples

curl — personal key

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/bookings/53/clients" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

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

const { success, data } = await res.json()
console.log('Booking clients after removal:', data)

JavaScript — OAuth application

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

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

Response fields

The response contains the booking clients, read again after the removal.

Field Type Description
Fieldsuccess Typeboolean Descriptiontrue on success
Fielddata Typearray DescriptionBooking clients after the removal
Fielddata[].id Typenumber DescriptionCRM contact or company ID
Fielddata[].type.code Typestring DescriptionClient type code: CONTACT — contact, COMPANY — company
Fielddata[].type.module Typestring DescriptionClient type module: crm

Response example

JSON
{
  "success": true,
  "data": []
}

Error response example

404 — no booking with this id exists:

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

Errors

HTTP Code Description
HTTP404 CodeENTITY_NOT_FOUND DescriptionNo booking with this id exists. Message: Booking record not found
HTTP400 CodeINVALID_PARAMS Descriptionid is not a positive integer. Message: id must be a canonical positive safe integer
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header is missing
HTTP401 CodeTOKEN_MISSING DescriptionThe key has no Bitrix24 tokens
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key is read-only. The request is rejected before it reaches Bitrix24
HTTP403 CodeSCOPE_DENIED DescriptionThe key does not have the booking scope
HTTP429 CodeRATE_LIMITED DescriptionRequest rate exceeded. The effective cap is in the x-ratelimit-limit header
HTTP502 CodeBITRIX_RESPONSE_INVALID DescriptionBitrix24 did not confirm the booking operation — Bitrix24 did not confirm the removal
HTTP502 CodeBITRIX_RESPONSE_INVALID DescriptionBitrix24 returned an unexpected booking response — Bitrix24 returned a client list of an unexpected shape

Full list of common API errors — Errors.

See also