[{"data":1,"prerenderedAt":11},["ShallowReactive",2],{"docs-entities\u002Fcrm-settings":3,"docs-tabs-entities\u002Fcrm-settings":6},{"content":4,"lastmod":5},"# CRM settings\n\nThe CRM mode determines whether leads are enabled. This section lets you check the CRM mode of your Bitrix24 account before building a scenario around leads.\n\nYou can also read and change CRM settings for the entire Bitrix24 account. READWRITE is required for a change. Send the complete JSON `value` matching `meta.schema`; a failed readback does not undo a successful write. Never retry blindly when the outcome is unknown. New setting methods require `crm 26.2000.0`; accounts without them receive `422 METHOD_NOT_YET_AVAILABLE` with `error.release`.\n\nBitrix24 API: `crm.settings.mode.get`, `crm.enum.settings.mode`, `crm.settings.list`, `crm.settings.get`, `crm.settings.set`\n\nScope: `crm`\n\n## Operations\n\n- [CRM mode](.\u002Fcrm-settings\u002Fmode.md) — `GET \u002Fv1\u002Fcrm-settings\u002Fmode`\n\n- [List CRM settings](.\u002Fcrm-settings\u002Flist.md) — `GET \u002Fv1\u002Fcrm-settings`\n- [Get a CRM setting](.\u002Fcrm-settings\u002Fget.md) — `GET \u002Fv1\u002Fcrm-settings\u002F:id`\n- [Change a CRM setting](.\u002Fcrm-settings\u002Fupdate.md) — `PATCH \u002Fv1\u002Fcrm-settings\u002F:id`\n\n## Key fields\n\n| Field | Description |\n|------|----------|\n| `mode` | Current mode: `1` — Classic CRM with leads, `2` — Simple CRM without leads |\n| `name` | Name of the current mode in the Bitrix24 account language |\n| `modes` | All modes of the Bitrix24 account, each with `id` and `name`. The current one is the item whose `id` equals `mode` |\n\n## Before you start\n\n1. **The mode is read-only.** You cannot switch the mode via the API. A READONLY key is sufficient.\n2. **Leads are available only in Classic CRM**, that is, when `mode` is `1`.\n3. **Build conditions on the number.** `name` depends on the Bitrix24 account language, so compare `mode`.\n\n## Typical scenario\n\n1. Get the mode: [`GET \u002Fv1\u002Fcrm-settings\u002Fmode`](.\u002Fcrm-settings\u002Fmode.md).\n2. If `mode` is `1`, proceed to [leads](\u002Fdocs\u002Fentities\u002Fleads). If `2`, build the scenario without leads.\n\n## Limits\n\n| Limit | Value |\n|-------|----------|\n| Pagination | none: the mode and the list of modes come in a single response |\n| Request rate | shared across the Vibecode API — see [Limits and optimization](\u002Fdocs\u002Foptimization) |\n\n## See also\n\n- [Leads](\u002Fdocs\u002Fentities\u002Fleads)\n- [CRM enums](\u002Fdocs\u002Fentities\u002Fcrm-enums)\n- [API reference](\u002Fdocs\u002Fapi-reference)\n","2026-11-03",{"crm-settings\u002Fmode.md":7,"crm-settings\u002Flist.md":8,"crm-settings\u002Fget.md":9,"crm-settings\u002Fupdate.md":10},"## CRM mode\n\n`GET \u002Fv1\u002Fcrm-settings\u002Fmode`\n\nReturns the CRM mode of the Bitrix24 account, so you can check whether leads are enabled before working with them.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-settings\u002Fmode\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-settings\u002Fmode\" \\\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\u002Fcrm-settings\u002Fmode', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { data } = await res.json()\nconst leadsEnabled = data.mode === 1\nconsole.log(data.name, leadsEnabled ? 'leads enabled' : 'leads disabled')\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-settings\u002Fmode', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | `true` on a successful request |\n| `data.mode` | number | Current mode: `1` — classic CRM with leads, `2` — simple CRM without leads |\n| `data.name` | string | Name of the current mode in the Bitrix24 account language |\n| `data.modes` | array | All modes the Bitrix24 account supports |\n| `data.modes[].id` | number | Mode identifier. The current mode is the item whose `id` equals `data.mode` |\n| `data.modes[].name` | string | Mode name in the Bitrix24 account language |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"mode\": 1,\n    \"name\": \"Classic CRM\",\n    \"modes\": [\n      { \"id\": 1, \"name\": \"Classic CRM\" },\n      { \"id\": 2, \"name\": \"Simple CRM\" }\n    ]\n  }\n}\n```\n\n## Error response example\n\n401 — the `X-Api-Key` header is missing:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"MISSING_API_KEY\",\n    \"message\": \"API key required. Pass via X-Api-Key header.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 403 | `BITRIX_ACCESS_DENIED` | The key's user has no permission to read CRM settings in Bitrix24 |\n| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request. The reason is in `message` |\n| 429 | `RATE_LIMITED` | Bitrix24 request rate exceeded. Retry in 1-2 seconds |\n| 502 | `BITRIX_RESPONSE_INVALID` | Bitrix24 returned the mode or the mode list in an unexpected shape, or the current mode is missing from the list |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable: it returned a server error or the connection dropped |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n| 401 | `TOKEN_MISSING` | The API key has no Bitrix24 tokens configured |\n| 403 | `SCOPE_DENIED` | The API key lacks the `crm` scope |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n- **Compare the mode by number.** `name` comes in the Bitrix24 account language, so build conditions on `mode`, not on the name.\n- **Query parameters are ignored.** The method takes no parameters; anything passed in the URL does not affect the response.\n\n## See also\n\n- [CRM settings](\u002Fdocs\u002Fentities\u002Fcrm-settings)\n- [Leads](\u002Fdocs\u002Fentities\u002Fleads)\n- [CRM reference lists](\u002Fdocs\u002Fentities\u002Fcrm-enums)\n","## List CRM settings\n\n`GET \u002Fv1\u002Fcrm-settings`\n\nList the CRM settings readable by the key owner, with their current values and accepted value schemas.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X GET \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-settings\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X GET \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-settings\" \\\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 response = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-settings', {\n  method: 'GET',\n  headers: {\"X-Api-Key\": \"YOUR_API_KEY\"},\n})\nconst result = await response.json()\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst response = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-settings', {\n  method: 'GET',\n  headers: {\"X-Api-Key\": \"YOUR_APP_KEY\", \"Authorization\": \"Bearer USER_SESSION_TOKEN\"},\n})\nconst result = await response.json()\n```\n\n## Response fields\n\n| Field | Description |\n|---|---|\n| `data[]` | Array of readable settings. |\n| `data[].id` | Identifier. |\n| `data[].value` | JSON value with its original type. |\n| `data[].meta.title` | Setting title. |\n| `data[].meta.description` | Setting description. |\n| `data[].meta.schema` | Accepted value schema, validated by Bitrix24. |\n\n## Response example\n\nResponse structure with neutral sample data.\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"id\": \"crm.layout.file_previewer.enabled\",\n      \"value\": true,\n      \"meta\": {\n        \"title\": \"File preview\",\n        \"description\": \"Preview files\",\n        \"schema\": {\n          \"type\": \"boolean\"\n        }\n      }\n    }\n  ]\n}\n```\n\n## Error response example\n\n400 — unknown query parameter:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"UNKNOWN_FILTER_FIELD\",\n    \"message\": \"Unknown query parameter\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|---|---|---|\n| 400 | `INVALID_PARAMS` | Invalid type or identifier. |\n| 400 | `UNKNOWN_FILTER_FIELD` | Unknown query parameter. |\n| 401 | `TOKEN_MISSING` | The key has no Bitrix24 credentials. |\n| 403 | `SCOPE_DENIED` | The `crm` scope is required. |\n| 404 | `ENTITY_NOT_FOUND` | The record is absent or inaccessible. |\n| 422 | `METHOD_NOT_YET_AVAILABLE` | The method is absent on the account. `error.release` names the required release. |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable or returned an invalid response shape. |\n\nOther Bitrix24 refusals retain their original code and message. Common [API errors](\u002Fdocs\u002Ferrors).\n\n## Known behavior\n\nAn object in `value` replaces the complete setting value. A successful write is not rolled back if its readback fails. Never blindly retry an ambiguous write failure: read the setting first.\n\n## See also\n\n- [CRM settings](\u002Fdocs\u002Fentities\u002Fcrm-settings)\n- [CRM e-mails](\u002Fdocs\u002Fentities\u002Fcrm-emails)\n","## Get a CRM setting\n\n`GET \u002Fv1\u002Fcrm-settings\u002F:id`\n\nRead one CRM setting by the string identifier returned by the settings list.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `id` (path) | string | yes | Identifier from the [settings list](.\u002Flist.md). |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X GET \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-settings\u002Fcrm.layout.file_previewer.enabled\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X GET \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-settings\u002Fcrm.layout.file_previewer.enabled\" \\\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 response = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-settings\u002Fcrm.layout.file_previewer.enabled', {\n  method: 'GET',\n  headers: {\"X-Api-Key\": \"YOUR_API_KEY\"},\n})\nconst result = await response.json()\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst response = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-settings\u002Fcrm.layout.file_previewer.enabled', {\n  method: 'GET',\n  headers: {\"X-Api-Key\": \"YOUR_APP_KEY\", \"Authorization\": \"Bearer USER_SESSION_TOKEN\"},\n})\nconst result = await response.json()\n```\n\n## Response fields\n\n| Field | Description |\n|---|---|\n| `data.id` | Identifier. |\n| `data.value` | JSON value with its original type. |\n| `data.meta.title` | Setting title. |\n| `data.meta.description` | Setting description. |\n| `data.meta.schema` | Accepted value schema, validated by Bitrix24. |\n\n## Response example\n\nResponse structure with neutral sample data.\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"crm.layout.file_previewer.enabled\",\n    \"value\": true,\n    \"meta\": {\n      \"title\": \"File preview\",\n      \"description\": \"Preview files\",\n      \"schema\": {\n        \"type\": \"boolean\"\n      }\n    }\n  }\n}\n```\n\n## Error response example\n\n400 — unknown query parameter:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"UNKNOWN_FILTER_FIELD\",\n    \"message\": \"Unknown query parameter\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|---|---|---|\n| 400 | `INVALID_PARAMS` | Invalid type or identifier. |\n| 400 | `UNKNOWN_FILTER_FIELD` | Unknown query parameter. |\n| 401 | `TOKEN_MISSING` | The key has no Bitrix24 credentials. |\n| 403 | `SCOPE_DENIED` | The `crm` scope is required. |\n| 404 | `ENTITY_NOT_FOUND` | The record is absent or inaccessible. |\n| 422 | `METHOD_NOT_YET_AVAILABLE` | The method is absent on the account. `error.release` names the required release. |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable or returned an invalid response shape. |\n\nOther Bitrix24 refusals retain their original code and message. Common [API errors](\u002Fdocs\u002Ferrors).\n\n## Known behavior\n\nAn object in `value` replaces the complete setting value. A successful write is not rolled back if its readback fails. Never blindly retry an ambiguous write failure: read the setting first.\n\n## See also\n\n- [CRM settings](\u002Fdocs\u002Fentities\u002Fcrm-settings)\n- [CRM e-mails](\u002Fdocs\u002Fentities\u002Fcrm-emails)\n","## Change a CRM setting\n\n`PATCH \u002Fv1\u002Fcrm-settings\u002F:id`\n\nChange a CRM setting for the entire Bitrix24 account. Use a key with write access and check the value schema first.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `id` (path) | string | yes | Identifier from the [settings list](.\u002Flist.md). |\n\n## Request body\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `value` | any JSON | yes | Complete value matching `meta.schema` from [get](.\u002Fget.md). Required even for `null`, `false` or `0`. |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-settings\u002Fcrm.layout.file_previewer.enabled\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"value\": true}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-settings\u002Fcrm.layout.file_previewer.enabled\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"value\": true}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst response = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-settings\u002Fcrm.layout.file_previewer.enabled', {\n  method: 'PATCH',\n  headers: {\"X-Api-Key\": \"YOUR_API_KEY\", \"Content-Type\": \"application\u002Fjson\"},\n  body: JSON.stringify({\"value\": true}),\n})\nconst result = await response.json()\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst response = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fcrm-settings\u002Fcrm.layout.file_previewer.enabled', {\n  method: 'PATCH',\n  headers: {\"X-Api-Key\": \"YOUR_APP_KEY\", \"Authorization\": \"Bearer USER_SESSION_TOKEN\", \"Content-Type\": \"application\u002Fjson\"},\n  body: JSON.stringify({\"value\": true}),\n})\nconst result = await response.json()\n```\n\n## Response fields\n\n| Field | Description |\n|---|---|\n| `data.id` | Identifier. |\n| `data.value` | JSON value with its original type. |\n| `data.meta.title` | Setting title. |\n| `data.meta.description` | Setting description. |\n| `data.meta.schema` | Accepted value schema, validated by Bitrix24. |\n\n## Response example\n\nResponse structure with neutral sample data.\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"crm.layout.file_previewer.enabled\",\n    \"value\": true,\n    \"meta\": {\n      \"title\": \"File preview\",\n      \"description\": \"Preview files\",\n      \"schema\": {\n        \"type\": \"boolean\"\n      }\n    }\n  }\n}\n```\n\n## Error response example\n\n400 — unknown query parameter or a missing required field:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"MISSING_REQUIRED_FIELDS\",\n    \"message\": \"value is required\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|---|---|---|\n| 400 | `INVALID_PARAMS` | Invalid type or identifier. |\n| 400 | `UNKNOWN_FILTER_FIELD` | Unknown query parameter. |\n| 400 | `MISSING_REQUIRED_FIELDS` | Missing required body field. |\n| 400 | `UNKNOWN_FIELD` | Unknown body field. |\n| 401 | `TOKEN_MISSING` | The key has no Bitrix24 credentials. |\n| 403 | `SCOPE_DENIED` | The `crm` scope is required. |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key access mode forbids writes. |\n| 404 | `ENTITY_NOT_FOUND` | The record is absent or inaccessible. |\n| 422 | `METHOD_NOT_YET_AVAILABLE` | The method is absent on the account. `error.release` names the required release. |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable or returned an invalid response shape. |\n\nOther Bitrix24 refusals retain their original code and message. Common [API errors](\u002Fdocs\u002Ferrors).\n\n## Known behavior\n\nAn object in `value` replaces the complete setting value. A successful write is not rolled back if its readback fails. Never blindly retry an ambiguous write failure: read the setting first.\n\n## See also\n\n- [CRM settings](\u002Fdocs\u002Fentities\u002Fcrm-settings)\n- [CRM e-mails](\u002Fdocs\u002Fentities\u002Fcrm-emails)\n",1794739358849]