For AI agents: markdown of this page — /docs-content-en/chats/messages/anchors.md documentation index — /llms.txt

Remove chat anchors

POST /v1/chats/:dialogId/anchors/read

Removes all your anchors in the chat. An anchor is a mark the Bitrix24 messenger places for you on an unread mention or on a reaction to your message: the client uses it to show the mention counter and to jump to the right message. To remove anchors only on selected messages, use POST /v1/chats/anchors/read.

Parameters

Parameter Type Required Default Description
ParameterdialogId (path) Typestring Requiredyes Default— DescriptionDialog ID: a numeric user ID for direct messages, chatXXX for group chats — the dialogId field of a recent dialogs row; a user ID comes from the user list. me — the current user's personal dialog

No body is needed. Query parameters and body fields are rejected with 400 INVALID_PARAMS.

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/chats/chat42/anchors/read" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/chats/chat42/anchors/read" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/chat42/anchors/read', {
  method: 'POST',
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})

const { success } = await res.json()
console.log('Anchors removed:', success)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/chat42/anchors/read', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success } = await res.json()
console.log('Anchors removed:', success)

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typeboolean Descriptiontrue, even when there was nothing to remove

Response example

JSON
{
  "success": true,
  "data": true
}

Error response example

400 — a query parameter was passed:

JSON
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "Query parameter `foo` is not accepted by POST /v1/chats/:dialogId/anchors/read. It takes no query parameters."
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptionA query parameter or a body field was passed. Checked before any call to Bitrix24
HTTP404 CodeENTITY_NOT_FOUND DescriptionBitrix24 returned "not found"; the portal code is in error.b24Code
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 returned an error; the portal code is in error.b24Code
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the im scope
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key is read-only — see access rights
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no Bitrix24 tokens configured
HTTP502 CodeME_ALIAS_RESOLUTION_FAILED DescriptionCould not resolve the current user for dialogId = me

The full list of common API errors — Errors.

Known specifics

This is a write operation, even though the method is called read. The call deletes marks, so a read-only key gets 403 WRITE_BLOCKED_READONLY_KEY before any call to Bitrix24.

List of anchors. To retrieve all your mention and reaction marks, list unread anchors.

Messages do not become read. Removing anchors does not move the read marker — to do that, mark the dialog as read.

See also