For AI agents: markdown of this page — /docs-content-en/openlines/quick-replies/update.md documentation index — /llms.txt

Update a quick reply

PATCH /v1/openline-configs/:lineId/quick-replies/:id

Replaces the text of an Open Channel quick reply and, if needed, moves it to another section or removes it from its section.

Parameters

Parameter Type Required Description
ParameterlineId (path) Typeinteger Requiredyes DescriptionOpen Channel ID. List: GET /v1/openline-configs
Parameterid (path) Typeinteger Requiredyes DescriptionID of a quick reply in this channel. List: data.replies[].id in the GET /v1/openline-configs/:lineId/quick-replies response

Request fields (body)

The body is passed flat, without a fields wrapper.

Field Type Required Description
Fieldtext Typestring Requiredyes DescriptionThe full new reply text. A string of whitespace only is not accepted
FieldsectionId Typeinteger Requiredno DescriptionID of a section in the same channel from data.sections in the GET /v1/openline-configs/:lineId/quick-replies response. Without the field the reply's section does not change; 0 removes the reply from its section

Examples

curl — personal key

Terminal
curl -X PATCH "https://vibecode.bitrix24.com/v1/openline-configs/3/quick-replies/7277" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello, an operator will reply within a minute",
    "sectionId": 123
  }'

curl — OAuth application

Terminal
curl -X PATCH "https://vibecode.bitrix24.com/v1/openline-configs/3/quick-replies/7277" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello, an operator will reply within a minute",
    "sectionId": 123
  }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/openline-configs/3/quick-replies/7277', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    text: 'Hello, an operator will reply within a minute',
    sectionId: 123,
  }),
})
const { data } = await res.json()
console.log(data.name, data.sectionId)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/openline-configs/3/quick-replies/7277', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    text: 'Hello, an operator will reply within a minute',
    sectionId: 123,
  }),
})
const { data } = await res.json()
console.log(data.name, data.sectionId)

Response fields

Field Type Description
Fieldsuccess Typeboolean Descriptiontrue on success
Fielddata Typeobject DescriptionThe quick reply after the edit. Same fields as a data.replies[] record in the quick reply list
Fielddata.id Typeinteger DescriptionReply ID, matches id from the path
Fielddata.name Typestring DescriptionReply name — the first 100 characters of the new text
Fielddata.text Typestring DescriptionReply text after the update
Fielddata.sectionId Typeinteger DescriptionSection ID after the update. 0 means the reply has no section
Fielddata.canEdit Typeboolean DescriptionWhether the key user can edit the reply
Fielddata.rating Typenumber | string DescriptionReply rating

Response example

JSON
{
  "success": true,
  "data": {
    "id": 7277,
    "name": "Hello, an operator will reply within a minute",
    "text": "Hello, an operator will reply within a minute",
    "sectionId": 123,
    "canEdit": true,
    "rating": 1
  }
}

Error response example

404 — the channel from the path has no reply with this id:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Quick reply not found in this line"
  }
}

Errors

HTTP Code Description
HTTP400 CodeMISSING_REQUIRED_FIELDS Descriptiontext was not passed, is empty, or consists of whitespace
HTTP400 CodeINVALID_PARAMS DescriptionlineId or id is not a positive integer
HTTP400 CodeINVALID_PARAMS DescriptionsectionId is not a non-negative integer
HTTP400 CodeINVALID_PARAMS DescriptionsectionId is not 0, differs from the reply's current section and is not among data.sections of this channel. The reply is not changed
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 DescriptionThe key user has no permission to view the channel's quick replies
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionBitrix24 denied access to the key user when saving
HTTP404 CodeENTITY_NOT_FOUND DescriptionMessage Quick reply not found in this line: the channel from the path has no reply with this id, including when the reply belongs to another channel
HTTP404 CodeENTITY_NOT_FOUND DescriptionMessage Record not found: there 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 update may have been saved: check the list of replies before retrying

Full list of common API errors — Errors.

See also