[{"data":1,"prerenderedAt":10},["ShallowReactive",2],{"docs-entities\u002Fbookings\u002Fclients":3,"docs-tabs-entities\u002Fbookings\u002Fclients":6},{"content":4,"lastmod":5},"# Booking clients\n\nBooking clients are the CRM contacts and companies a booking is made for. The methods in this subsection read the booking clients, replace their whole set, and remove all clients in one call.\n\nBitrix24 API: `booking.v1.booking.client.list`, `booking.v1.booking.client.set`, `booking.v1.booking.client.unset`\nScope: `booking`\n\n## Operations\n\n- [List booking clients](.\u002Fclients-list.md) — `GET \u002Fv1\u002Fbookings\u002F:id\u002Fclients`\n- [Replace booking clients](.\u002Fclients-set.md) — `PUT \u002Fv1\u002Fbookings\u002F:id\u002Fclients`\n- [Remove booking clients](.\u002Fclients-delete.md) — `DELETE \u002Fv1\u002Fbookings\u002F:id\u002Fclients`\n\n## Key fields\n\nFields of a single client. They are returned in every response item of all three methods and passed in the body of the replace request.\n\n| Field | Description |\n|------|----------|\n| `id` | CRM contact or company ID. Lists: [`GET \u002Fv1\u002Fcontacts`](\u002Fdocs\u002Fentities\u002Fcontacts\u002Flist), [`GET \u002Fv1\u002Fcompanies`](\u002Fdocs\u002Fentities\u002Fcompanies\u002Flist) |\n| `type.module` | Client type module: `crm` |\n| `type.code` | Client type code: `CONTACT` — contact, `COMPANY` — company. Dictionary: [`GET \u002Fv1\u002Fbooking-client-types`](\u002Fdocs\u002Fentities\u002Fbooking-client-types) |\n\n## What to know before you start\n\n1. **The client type comes from the dictionary.** Take the `type.module` and `type.code` pair from [`GET \u002Fv1\u002Fbooking-client-types`](\u002Fdocs\u002Fentities\u002Fbooking-client-types). A pair that is not in the dictionary is rejected with `400 INVALID_PARAMS` before writing.\n2. **Replace, not add.** Replacement writes the set you pass in full: clients missing from the request are removed from the booking. An empty `clients` array removes all of them.\n3. **Clients are checked before writing.** A nonexistent contact or company returns `404 ENTITY_NOT_FOUND`, and the booking clients stay unchanged.\n4. **A write returns the re-read list.** After writing, replacement and removal read the booking clients again and return them.\n5. **A read-only key can read clients.** Replacement and removal with such a key return `403 WRITE_BLOCKED_READONLY_KEY`.\n6. **Notifications.** On a resource with notifications enabled, a booking change can send the client an SMS or a messenger message. For test calls, use your own resource with notifications disabled.\n\n## Typical scenario\n\n1. Find a booking: [`GET \u002Fv1\u002Fbookings`](\u002Fdocs\u002Fentities\u002Fbookings\u002Flist).\n2. Find a contact or company: [`GET \u002Fv1\u002Fcontacts`](\u002Fdocs\u002Fentities\u002Fcontacts\u002Flist), [`GET \u002Fv1\u002Fcompanies`](\u002Fdocs\u002Fentities\u002Fcompanies\u002Flist).\n3. Set the booking clients: [`PUT \u002Fv1\u002Fbookings\u002F:id\u002Fclients`](.\u002Fclients-set.md).\n4. Check the clients: [`GET \u002Fv1\u002Fbookings\u002F:id\u002Fclients`](.\u002Fclients-list.md).\n\n## Limits\n\n| Limit | Value |\n|-------|----------|\n| List pagination | None: [`GET \u002Fv1\u002Fbookings\u002F:id\u002Fclients`](.\u002Fclients-list.md) returns all clients of the booking in one call |\n| Request rate | Common API limits — [Limits and optimization](\u002Fdocs\u002Foptimization) |\n| Replacement time | Grows with the number of clients: before writing, each contact and company is checked one at a time. Replacing 55 contacts takes about 30 seconds — [Client-side timeout](\u002Fdocs\u002Foptimization#client-side-timeout) |\n\n## See also\n\n- [Bookings](\u002Fdocs\u002Fentities\u002Fbookings)\n- [Booking client types](\u002Fdocs\u002Fentities\u002Fbooking-client-types)\n- [Wait list clients](\u002Fdocs\u002Fentities\u002Fbooking-wait-list\u002Fclients)\n- [Contacts](\u002Fdocs\u002Fentities\u002Fcontacts)\n- [Companies](\u002Fdocs\u002Fentities\u002Fcompanies)\n","2026-10-14",{"clients-list.md":7,"clients-set.md":8,"clients-delete.md":9},"## List booking clients\n\n`GET \u002Fv1\u002Fbookings\u002F:id\u002Fclients`\n\nReturns the CRM contacts and companies recorded as clients of the booking.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|----------|\n| `id` (path) | number | yes | Booking ID. List: [`GET \u002Fv1\u002Fbookings`](\u002Fdocs\u002Fentities\u002Fbookings\u002Flist) |\n\nThe generic `filter` parameter is not applied by this endpoint. By default, the API preserves the previous HTTP 200 response and data, adds `Warning: 299 - \"filter is not supported on this endpoint and was ignored\"`, and records unsupported-filter use in the server log.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbookings\u002F53\u002Fclients\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbookings\u002F53\u002Fclients\" \\\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\u002Fbookings\u002F53\u002Fclients', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\nconst contacts = data.filter((client) => client.type.code === 'CONTACT')\nconsole.log('Booking contacts:', contacts.map((client) => client.id))\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbookings\u002F53\u002Fclients', {\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\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | `true` on success |\n| `data` | array | Booking clients. A booking without clients returns an empty array |\n| `data[].id` | number | CRM contact or company ID. Get: [`GET \u002Fv1\u002Fcontacts\u002F:id`](\u002Fdocs\u002Fentities\u002Fcontacts\u002Fget), [`GET \u002Fv1\u002Fcompanies\u002F:id`](\u002Fdocs\u002Fentities\u002Fcompanies\u002Fget) |\n| `data[].type.code` | string | Client type code: `CONTACT` — contact, `COMPANY` — company. Dictionary: [`GET \u002Fv1\u002Fbooking-client-types`](\u002Fdocs\u002Fentities\u002Fbooking-client-types) |\n| `data[].type.module` | string | Client type module: `crm` |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"id\": 3013,\n      \"type\": {\n        \"code\": \"CONTACT\",\n        \"module\": \"crm\"\n      }\n    },\n    {\n      \"id\": 3149,\n      \"type\": {\n        \"code\": \"COMPANY\",\n        \"module\": \"crm\"\n      }\n    }\n  ]\n}\n```\n\n## Error response example\n\n404 — no booking with this `id` exists:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"Booking record not found\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 200 | `Warning: 299` | The filter is ignored by default; previous data is preserved and the warning is sent in the `Warning` header. |\n| 400 (strict mode only) | `UNSUPPORTED_FILTER` | The server mode is disabled by default; until it is enabled, the endpoint preserves HTTP 200 and the previous data. |\n| 404 | `ENTITY_NOT_FOUND` | No booking with this `id` exists. Message: `Booking record not found` |\n| 400 | `INVALID_PARAMS` | `id` is not a positive integer. Message: `id must be a canonical positive safe integer` |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n| 401 | `TOKEN_MISSING` | The key has no Bitrix24 tokens |\n| 403 | `SCOPE_DENIED` | The key does not have the `booking` scope |\n| 429 | `RATE_LIMITED` | Request rate exceeded. The effective cap is in the `x-ratelimit-limit` header |\n| 502 | `BITRIX_RESPONSE_INVALID` | Bitrix24 returned a client list of an unexpected shape |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Booking clients](\u002Fdocs\u002Fentities\u002Fbookings\u002Fclients)\n- [Replace booking clients](\u002Fdocs\u002Fentities\u002Fbookings\u002Fclients-set)\n- [Remove booking clients](\u002Fdocs\u002Fentities\u002Fbookings\u002Fclients-delete)\n- [Get a booking](\u002Fdocs\u002Fentities\u002Fbookings\u002Fget)\n- [Booking client types](\u002Fdocs\u002Fentities\u002Fbooking-client-types)\n","## Replace booking clients\n\n`PUT \u002Fv1\u002Fbookings\u002F:id\u002Fclients`\n\nReplaces the booking clients with the passed set: clients missing from the request are removed from the booking. An empty `clients` array removes all clients.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|----------|\n| `id` (path) | number | yes | Booking ID. List: [`GET \u002Fv1\u002Fbookings`](\u002Fdocs\u002Fentities\u002Fbookings\u002Flist) |\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|----------|\n| `clients` | array | yes | New set of booking clients. An empty array removes all clients |\n| `clients[].id` | number | yes | CRM contact or company ID. Lists: [`GET \u002Fv1\u002Fcontacts`](\u002Fdocs\u002Fentities\u002Fcontacts\u002Flist), [`GET \u002Fv1\u002Fcompanies`](\u002Fdocs\u002Fentities\u002Fcompanies\u002Flist) |\n| `clients[].type.module` | string | yes | Client type module: `crm`. Dictionary: [`GET \u002Fv1\u002Fbooking-client-types`](\u002Fdocs\u002Fentities\u002Fbooking-client-types) |\n| `clients[].type.code` | string | yes | Client type code: `CONTACT` — contact, `COMPANY` — company. Dictionary: [`GET \u002Fv1\u002Fbooking-client-types`](\u002Fdocs\u002Fentities\u002Fbooking-client-types) |\n\nThe body accepts no other fields: an extra field returns `400 INVALID_PARAMS`.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X PUT \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbookings\u002F53\u002Fclients\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"clients\": [\n      { \"id\": 3013, \"type\": { \"module\": \"crm\", \"code\": \"CONTACT\" } },\n      { \"id\": 3149, \"type\": { \"module\": \"crm\", \"code\": \"COMPANY\" } }\n    ]\n  }'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X PUT \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbookings\u002F53\u002Fclients\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"clients\": [\n      { \"id\": 3013, \"type\": { \"module\": \"crm\", \"code\": \"CONTACT\" } },\n      { \"id\": 3149, \"type\": { \"module\": \"crm\", \"code\": \"COMPANY\" } }\n    ]\n  }'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbookings\u002F53\u002Fclients', {\n  method: 'PUT',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    clients: [\n      { id: 3013, type: { module: 'crm', code: 'CONTACT' } },\n      { id: 3149, type: { module: 'crm', code: 'COMPANY' } },\n    ],\n  }),\n})\n\nconst { success, data } = await res.json()\nconsole.log('Booking clients:', data.map((client) => `${client.type.code} ${client.id}`))\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbookings\u002F53\u002Fclients', {\n  method: 'PUT',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    clients: [\n      { id: 3013, type: { module: 'crm', code: 'CONTACT' } },\n      { id: 3149, type: { module: 'crm', code: 'COMPANY' } },\n    ],\n  }),\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\nThe response contains the booking clients, read again after the write.\n\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | `true` on success |\n| `data` | array | Booking clients after the replacement. An empty array if `clients` was empty |\n| `data[].id` | number | CRM contact or company ID. Get: [`GET \u002Fv1\u002Fcontacts\u002F:id`](\u002Fdocs\u002Fentities\u002Fcontacts\u002Fget), [`GET \u002Fv1\u002Fcompanies\u002F:id`](\u002Fdocs\u002Fentities\u002Fcompanies\u002Fget) |\n| `data[].type.code` | string | Client type code: `CONTACT` — contact, `COMPANY` — company |\n| `data[].type.module` | string | Client type module: `crm` |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"id\": 3013,\n      \"type\": {\n        \"code\": \"CONTACT\",\n        \"module\": \"crm\"\n      }\n    },\n    {\n      \"id\": 3149,\n      \"type\": {\n        \"code\": \"COMPANY\",\n        \"module\": \"crm\"\n      }\n    }\n  ]\n}\n```\n\n## Error response example\n\n400 — the client type is not in the dictionary:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_PARAMS\",\n    \"message\": \"Client type not found\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 400 | `INVALID_PARAMS` | `Client type not found` — the `type.module` and `type.code` pair is not in the [client type dictionary](\u002Fdocs\u002Fentities\u002Fbooking-client-types). The booking clients stay unchanged |\n| 400 | `INVALID_PARAMS` | `Each client requires id and type.module\u002Ftype.code` — a `clients` item has no `id`, `type.module` or `type.code`, or its `id` is not a positive integer |\n| 400 | `INVALID_PARAMS` | `Only clients can be written` — the body contains a field other than `clients` |\n| 400 | `INVALID_PARAMS` | `id must be a canonical positive safe integer` — the booking `id` is not a positive integer |\n| 400 | `MISSING_REQUIRED_FIELDS` | `clients must be an array` — the body has no `clients`, or it is not an array |\n| 404 | `ENTITY_NOT_FOUND` | `Booking record not found` — no booking with this `id` exists |\n| 404 | `ENTITY_NOT_FOUND` | No CRM contact or company with the given `clients[].id` exists. The booking clients stay unchanged |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n| 401 | `TOKEN_MISSING` | The key has no Bitrix24 tokens |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only. The request is rejected before it reaches Bitrix24 |\n| 403 | `SCOPE_DENIED` | The key does not have the `booking` scope |\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 booking operation` — Bitrix24 did not confirm the write |\n| 502 | `BITRIX_RESPONSE_INVALID` | `Bitrix24 returned an unexpected booking response` — Bitrix24 returned a client list of an unexpected shape |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Booking clients](\u002Fdocs\u002Fentities\u002Fbookings\u002Fclients)\n- [List booking clients](\u002Fdocs\u002Fentities\u002Fbookings\u002Fclients-list)\n- [Remove booking clients](\u002Fdocs\u002Fentities\u002Fbookings\u002Fclients-delete)\n- [Booking client types](\u002Fdocs\u002Fentities\u002Fbooking-client-types)\n- [List contacts](\u002Fdocs\u002Fentities\u002Fcontacts\u002Flist)\n- [List companies](\u002Fdocs\u002Fentities\u002Fcompanies\u002Flist)\n","## Remove booking clients\n\n`DELETE \u002Fv1\u002Fbookings\u002F:id\u002Fclients`\n\nRemoves all clients from the booking in one call. The contacts and companies stay in CRM.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|----------|\n| `id` (path) | number | yes | Booking ID. List: [`GET \u002Fv1\u002Fbookings`](\u002Fdocs\u002Fentities\u002Fbookings\u002Flist) |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbookings\u002F53\u002Fclients\" \\\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\u002Fbookings\u002F53\u002Fclients\" \\\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\u002Fbookings\u002F53\u002Fclients', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\nconsole.log('Booking clients after removal:', data)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbookings\u002F53\u002Fclients', {\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\nThe response contains the booking clients, read again after the removal.\n\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | `true` on success |\n| `data` | array | Booking clients after the removal |\n| `data[].id` | number | CRM contact or company ID |\n| `data[].type.code` | string | Client type code: `CONTACT` — contact, `COMPANY` — company |\n| `data[].type.module` | string | Client type module: `crm` |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": []\n}\n```\n\n## Error response example\n\n404 — no booking with this `id` exists:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"Booking record not found\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 404 | `ENTITY_NOT_FOUND` | No booking with this `id` exists. Message: `Booking record not found` |\n| 400 | `INVALID_PARAMS` | `id` is not a positive integer. Message: `id must be a canonical positive safe integer` |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n| 401 | `TOKEN_MISSING` | The key has no Bitrix24 tokens |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only. The request is rejected before it reaches Bitrix24 |\n| 403 | `SCOPE_DENIED` | The key does not have the `booking` scope |\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 booking operation` — Bitrix24 did not confirm the removal |\n| 502 | `BITRIX_RESPONSE_INVALID` | `Bitrix24 returned an unexpected booking response` — Bitrix24 returned a client list of an unexpected shape |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Booking clients](\u002Fdocs\u002Fentities\u002Fbookings\u002Fclients)\n- [List booking clients](\u002Fdocs\u002Fentities\u002Fbookings\u002Fclients-list)\n- [Replace booking clients](\u002Fdocs\u002Fentities\u002Fbookings\u002Fclients-set)\n- [Delete a booking](\u002Fdocs\u002Fentities\u002Fbookings\u002Fdelete)\n",1795415181101]