[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fcrm-settings\u002Fmode":3,"docs-tabs-entities\u002Fcrm-settings\u002Fmode":6},{"content":4,"lastmod":5},"## 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","2026-10-15",{},1794739359209]