For AI agents: markdown of this page — /docs-content-en/openlines/send-form.md documentation index — /llms.txt
Send a CRM form to a customer
POST /v1/openlines/sessions/send-form
Sends a form into an Open Channel dialog. This is a message to a real customer. Bitrix24 checks the current user's access to the chat.
Requires BOTH imopenlines and crm scopes and a READWRITE key.
Parameters
| Body field | Type | Required | Description |
|---|---|---|---|
Body fieldsessionId |
Typeinteger | Requiredyes | DescriptionPositive session ID from session search; this is not a chatId |
Body fieldformId |
Typeinteger | Requiredyes | DescriptionPositive CRM form ID |
Only these two fields are accepted. The server resolves the form code, name and public security code. Retrieving this metadata may generate missing JavaScript loaders for forms in Bitrix24.
Example
curl -X POST 'https://vibecode.bitrix24.com/v1/openlines/sessions/send-form' \
-H 'X-Api-Key: YOUR_API_KEY' -H 'Content-Type: application/json' \
-d '{"sessionId":9,"formId":8}'
For an OAuth application, use its key and the Authorization: Bearer USER_SESSION_TOKEN header.
Success is HTTP 200:
{"success":true,"data":{"sent":true}}
sent acknowledges that Bitrix24 accepted the call, not that the customer received the message. Internal form codes are not returned. Do not retry blindly after an ambiguous failure: it may send a duplicate message.
Errors
| HTTP | Code | Reason |
|---|---|---|
| HTTP400 | CodeMISSING_REQUIRED_FIELDS |
ReasonMissing sessionId or formId |
| HTTP400 | CodeINVALID_PARAMS |
ReasonInvalid id, body or an extra parameter |
| HTTP400 | CodeSESSION_ID_EMPTY, FORM_INFO_EMPTY |
ReasonBitrix24 parameter refusal |
| HTTP403 | CodeSCOPE_DENIED |
ReasonMissing one of the two scopes |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
ReasonREADONLY key |
| HTTP403 | CodeACCESS_ERROR |
ReasonBitrix24 refused dialog access |
| HTTP404 | CodeNO_SESSION_ERROR |
ReasonSession not found |
| HTTP404 | CodeENTITY_NOT_FOUND |
ReasonForm not found |
| HTTP502 | CodeBITRIX_RESPONSE_INVALID |
ReasonInvalid Bitrix24 response |
Bitrix24 refusal messages are retained. See limits for common errors. To submit form data entered by a visitor, use form results.