For AI agents: markdown of this page — /docs-content-en/entities/crm-v3-dictionaries/leads-enable.md documentation index — /llms.txt
Enable leads
POST /v1/leads/enable
Switches the entire Bitrix24 account to Classic CRM with leads.
This method requires a CRM update after
26.2200.0; no released version number is available yet. It is not available on all Bitrix24 accounts. An administrator must enable the feature.
Warning: this changes CRM mode for the whole Bitrix24 account, affecting all users. CRM administrator permissions are required; plan restrictions also apply. Use a READWRITE key with the crm scope.
Request body
The request takes no path or query parameters. Send no body or an empty object {}. Body fields are rejected.
Examples
curl — personal key
curl -X POST "https://vibecode.bitrix24.com/v1/leads/enable" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X POST "https://vibecode.bitrix24.com/v1/leads/enable" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/leads/enable', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const result = await res.json()
console.log(result)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/leads/enable', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const result = await res.json()
console.log(result)
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | Descriptiontrue on success |
Fielddata.enabled |
Typeboolean | DescriptionWhether leads are enabled after the action |
Response example
HTTP 200.
{
"success": true,
"data": {
"enabled": true
}
}
Error response example
400 — a body field was supplied:
{
"success": false,
"error": {
"code": "INVALID_PARAMS",
"message": "This action takes no body fields"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
DescriptionInvalid path or request body |
| HTTP400 | CodeUNKNOWN_FILTER_FIELD |
DescriptionUnknown or repeated query parameter |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionInsufficient Bitrix24 permissions |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key lacks the crm scope |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionA READONLY key cannot write |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe key has no configured Bitrix24 credentials |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionThe X-Api-Key header is missing |
| HTTP422 | CodeMETHOD_NOT_YET_AVAILABLE |
DescriptionThe feature is disabled or the method is unavailable on this portal. error.release identifies the update |
| HTTP502 | CodeBITRIX_UNAVAILABLE |
DescriptionBitrix24 returned a malformed response |
Other native Bitrix24 refusals retain their HTTP status, code and message, with credentials removed. For common API errors, see Errors.
Known specifics
Do not blindly retry after a timeout or connection failure: the mode may have changed. First read GET /v1/crm-settings/mode and compare the current mode with the intended result.