For AI agents: markdown of this page — /docs-content-en/entities/crm-forms/validate.md documentation index — /llms.txt
Validate a form
POST /v1/crm-forms/validate
Bitrix24 method: crm.form.validate (REST v3).
Scope: crm. READONLY is supported; no data is written.
Behavior and parameters
Checks a draft at POST /v1/crm-forms/validate or changes to a stored form at POST /v1/crm-forms/:id/validate. An empty object on the stored-form route checks the existing form. Neither route saves data or changes its version. valid:false is a successful HTTP 200 response; inspect each violation. Bitrix24 still checks the user permission needed to edit forms.
Allowed top-level properties: name, active on creation only, languageId, templateId, crm, appearance, fields, responsible, agreements, submission, callback, payment, booking, presetFields, dependencies; update additionally requires updatedTime. Nested values are passed unchanged; Bitrix24 validates them. analytics, integrations, spamProtection and unknown top-level properties are refused before calling Bitrix24. Read field metadata with form fields.
Set required and multiple explicitly for each field; omitted flags are saved as true. List, checkbox, radio, product and booking fields cannot be configured through this contract; validation reports violations. The appearance theme is not part of the writable projection; Bitrix24 decides how to handle an unrecognized nested property.
Bitrix24 does not perform writes on free or demo plans. Permissions, quota and business rules are checked by Bitrix24.
Example
curl -X POST 'https://vibecode.bitrix24.com/v1/crm-forms/validate' \
-H 'X-Api-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"name":"Contact form","crm":{"entityScheme":1},"fields":[{"name":"LEAD_NAME","type":"string","label":"Name","required":false,"multiple":false},{"name":"LEAD_PHONE","type":"phone","label":"Phone","required":false,"multiple":false}]}'
For an OAuth application, use its key and the Authorization: Bearer USER_SESSION_TOKEN header.
{"success":true,"data":{"valid":false,"violations":[{"field":"fields[0].type","message":"Unsupported field type"}]}}
Errors
| HTTP | Code | Reason |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
ReasonInvalid id, body or query shape |
| HTTP400 | CodeREADONLY_FIELD |
ReasonUnpublished field |
| HTTP400 | CodeUNKNOWN_FIELD |
ReasonUnknown top-level field |
| HTTP402 | CodeCRM_FORM_WRITE_RESTRICTED |
ReasonBitrix24 plan does not allow writing CRM forms |
| HTTP403 | CodeSCOPE_DENIED |
ReasonMissing crm scope |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
ReasonBitrix24 permission refusal |
| HTTP403 | CodeCRM_FORM_SYSTEM_IMMUTABLE |
ReasonSystem form cannot be changed |
| HTTP404 | CodeENTITY_NOT_FOUND |
ReasonForm does not exist |
| HTTP409 | CodeCRM_FORM_VERSION_MISMATCH |
ReasonVersion is stale; error.currentUpdatedTime contains the current version |
| HTTP422 | CodeBITRIX_ERROR |
ReasonOther Bitrix24 refusal, original message retained |
| HTTP502 | CodeBITRIX_UNAVAILABLE |
ReasonInvalid or unavailable upstream response; re-read the form before retrying a write |
Bitrix24 codes, statuses and messages are retained. See common limits for shared 429, 502 and 503 responses.
Scalar null values are passed to Bitrix24 for clearing; supplied collections replace the previous collection, and an empty array clears it.