For AI agents: markdown of this page — /docs-content-en/entities/crm-forms/deactivate.md documentation index — /llms.txt
Deactivate a form
POST /v1/crm-forms/:id/deactivate
Deactivates a CRM form by ID and keeps its settings, so a deactivated form can be activated again.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterid (path) |
Typeinteger | Requiredyes | DescriptionForm ID. List: GET /v1/crm-forms |
The method takes no query string parameters: any such parameter returns 400 INVALID_PARAMS.
Request fields (body)
The body can be omitted or passed as an empty object {}. Any field other than updatedTime returns 400 INVALID_PARAMS.
| Field | Type | Required | Description |
|---|---|---|---|
FieldupdatedTime |
Typestring | Requiredno | DescriptionLast modification time of the form from GET /v1/crm-forms/:id. If the form was modified after this time, deactivation is rejected with 409 CRM_FORM_VERSION_MISMATCH. Without the field, no version check is performed |
Examples
curl — personal key
curl -X POST "https://vibecode.bitrix24.com/v1/crm-forms/75/deactivate" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
curl — OAuth application
curl -X POST "https://vibecode.bitrix24.com/v1/crm-forms/75/deactivate" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/crm-forms/75/deactivate', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
})
const { data } = await res.json()
console.log(data.active, data.updatedTime)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/crm-forms/75/deactivate', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
})
const { data } = await res.json()
console.log(data.active, data.updatedTime)
Bitrix24 validates the type and value of updatedTime.
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | Descriptiontrue on successful deactivation |
Fielddata.active |
Typeboolean | DescriptionForm state after the call |
Fielddata.updatedTime |
Typestring | DescriptionLast modification time of the form after deactivation, ISO 8601 with a time zone offset. Pass it in the next write request |
Response example
{
"success": true,
"data": {
"active": false,
"updatedTime": "2026-11-05T08:25:34Z"
}
}
Error response example
404 — no form with this id:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"b24Code": "BITRIX_REST_V3_EXCEPTION_ENTITYNOTFOUNDEXCEPTION",
"message": "Record with ID = `99999999` not found"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
Descriptionid is not a positive integer, a query string parameter is passed, the body is not a JSON object, or the body contains a field other than updatedTime |
| HTTP402 | CodeCRM_FORM_WRITE_RESTRICTED |
DescriptionThe Bitrix24 plan does not allow writing CRM forms. Writes are not performed on free and demo plans |
| HTTP403 | CodeCRM_FORM_SYSTEM_IMMUTABLE |
DescriptionThe form is a system form — system: true in the form list. A system form cannot be deactivated |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionNo form with this id |
| HTTP409 | CodeCRM_FORM_VERSION_MISMATCH |
DescriptionThe form was modified after the passed updatedTime. The current modification time is in error.currentUpdatedTime |
| HTTP403 | CodeBITRIX_INSUFFICIENT_SCOPE |
DescriptionThe Bitrix24 token lacks the required scope |
| HTTP409 | CodeCRM_FORM_REST_NOT_ENABLED |
DescriptionThe CRM form methods are disabled on the Bitrix24 account |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionBitrix24 denied the key's user access to the form |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionAnother Bitrix24 refusal. The refusal text is in error.message |
| HTTP500 | CodeCRM_FORM_SIDE_EFFECT_FAILED |
DescriptionThe change is already saved, but the operation completed with an error. Re-read the form via GET /v1/crm-forms/:id before retrying |
| HTTP502 | CodeBITRIX_UNAVAILABLE |
DescriptionBitrix24 is unavailable or returned a response of an unexpected shape. Re-read the form before retrying |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionThe key is read-only |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key lacks the crm scope |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionX-Api-Key is not passed |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe key has no valid Bitrix24 authorization |
Upstream errors include the original code in error.b24Code and field violations in error.validation when provided. CRM_FORM_* codes retain their HTTP status, code and message. 429 and 503 responses are described in Limits and optimization. Full list of common API errors — Errors.
Known specifics
- A repeated call does not return an error. Deactivating an already inactive form returns
200withactive: false, andupdatedTimedoes not change.