For AI agents: markdown of this page — /docs-content-en/openlines/quick-replies/create.md documentation index — /llms.txt
Create a quick reply
POST /v1/openline-configs/:lineId/quick-replies
Adds a quick reply to an Open Channel — a prepared text that the operator inserts into a conversation with a client.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ParameterlineId (path) |
Typeinteger | Requiredyes | DescriptionOpen Channel ID. List: GET /v1/openline-configs |
Request fields (body)
The body is passed flat, without a fields wrapper.
| Field | Type | Required | Description |
|---|---|---|---|
Fieldtext |
Typestring | Requiredyes | DescriptionReply text. A string of whitespace only is not accepted |
FieldsectionId |
Typeinteger | Requiredno | DescriptionID of a section of the same channel from data.sections in the GET /v1/openline-configs/:lineId/quick-replies response. Without the field the reply is created without a section, and sectionId in the response is 0 |
Examples
curl — personal key
curl -X POST "https://vibecode.bitrix24.com/v1/openline-configs/3/quick-replies" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Delivery within the city takes one to two business days",
"sectionId": 127
}'
curl — OAuth application
curl -X POST "https://vibecode.bitrix24.com/v1/openline-configs/3/quick-replies" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"text": "Delivery within the city takes one to two business days",
"sectionId": 127
}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/openline-configs/3/quick-replies', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: 'Delivery within the city takes one to two business days',
sectionId: 127,
}),
})
const { data } = await res.json()
console.log('Reply ID:', data.id)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/openline-configs/3/quick-replies', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: 'Delivery within the city takes one to two business days',
sectionId: 127,
}),
})
const { data } = await res.json()
console.log('Reply ID:', data.id)
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | Descriptiontrue on success |
Fielddata |
Typeobject | DescriptionThe created quick reply. Same fields as a data.replies[] record in the quick reply list |
Fielddata.id |
Typeinteger | DescriptionID of the created reply. Needed to update and delete it |
Fielddata.name |
Typestring | DescriptionReply name — the first 100 characters of text |
Fielddata.text |
Typestring | DescriptionReply text |
Fielddata.sectionId |
Typeinteger | DescriptionSection ID. 0 means the reply has no section |
Fielddata.canEdit |
Typeboolean | DescriptionWhether the key's user can edit the reply |
Fielddata.rating |
Typenumber | string | DescriptionReply rating. A new reply has 1 |
Response example
{
"success": true,
"data": {
"id": 7279,
"name": "Delivery within the city takes one to two business days",
"text": "Delivery within the city takes one to two business days",
"sectionId": 127,
"canEdit": true,
"rating": 1
}
}
Error response example
400 — text was not passed or contains only whitespace:
{
"success": false,
"error": {
"code": "MISSING_REQUIRED_FIELDS",
"message": "text must be a non-empty string"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeMISSING_REQUIRED_FIELDS |
Descriptiontext was not passed, is empty, or consists of whitespace |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionlineId is not a positive integer |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionsectionId is not a non-negative integer |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionsectionId is not 0 and is not among data.sections of this channel. The reply is not created |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionThe request body is not a JSON object |
| HTTP400 | CodeINVALID_JSON_BODY |
DescriptionThe request body cannot be parsed as JSON |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionThe X-Api-Key header was not passed |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe key has no valid authorization in Bitrix24 |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key lacks the imopenlines scope |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionThe key is in read-only mode |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionsectionId is passed, but the channel's quick replies are unavailable to the key user: no permission to view them, or the plan does not include them |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionBitrix24 denied access to the key's user |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionThere is no Open Channel with this lineId |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 returned an error. The text is in message |
| HTTP429 | CodeRATE_LIMITED |
DescriptionThe method's own limit was exceeded. The overall platform ceiling is 120 requests per minute per portal and is split across platform replicas, so the code may arrive before the 120th request. The effective value is in the x-ratelimit-limit header |
| HTTP502 | CodeOPENLINE_OPERATOR_FAILED |
DescriptionBitrix24 returned a response of an unexpected shape |
| HTTP502 | CodeBITRIX_UNAVAILABLE |
DescriptionBitrix24 is unavailable |
| HTTP503 | CodeBITRIX_TIMEOUT |
DescriptionBitrix24 did not respond in time. The reply may have been created: check the list of replies before retrying |
Full list of common API errors — Errors.
Known specifics
The name comes from the text only. The name field in the request body is ignored, and the reply name is built from text.