For AI agents: markdown of this page — /docs-content-en/chats/messages/anchors-list.md documentation index — /llms.txt
List unread anchors
GET /v1/chats/anchors
This method is rolling out in the
im 26.1600.0update. It is not yet available on every Bitrix24 account. If the method is not available, the API returns422 METHOD_NOT_YET_AVAILABLEwitherror.release.
Retrieves your unread mention and reaction marks across all chats. Use them to display counters and navigate to marked messages.
There are no parameters or request body. Any query parameter is rejected with 400 INVALID_PARAMS. The im scope is required, and read-only keys are supported.
Examples
curl — personal key
curl "https://vibecode.bitrix24.com/v1/chats/anchors" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/chats/anchors" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/anchors', {
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { success, data, error } = await res.json()
console.log(success ? data.anchors : error)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/anchors', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { success, data, error } = await res.json()
console.log(success ? data.anchors : error)
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata.anchors |
Typearray | DescriptionAll your anchors. An empty array when there are no marks |
Fielddata.anchors[].chatId |
Typenumber | DescriptionID of the chat containing the marked message. For a group chat, pass chatN, where N is this value, to get a chat |
Fielddata.anchors[].messageId |
Typenumber | DescriptionID of the marked message. To navigate: messages around a message |
Fielddata.anchors[].fromUserId |
Typenumber | DescriptionID of the user who mentioned you or reacted. Details: user list |
Fielddata.anchors[].type |
Typestring | DescriptionMark type: mention for a mention, reaction for a reaction |
Fielddata.anchors[].subType |
Typestring or null | DescriptionReaction code, such as like. null for a mention |
Fielddata.anchors[].parentChatId |
Typenumber | DescriptionParent chat ID, or 0 if there is no parent. For a group parent chat, pass chatN, where N is the nonzero parentChatId, to get a chat |
Fielddata.anchors[].parentMessageId |
Typenumber | DescriptionParent message ID, or 0 if there is no parent message. To navigate: messages around a message |
Fielddata.anchors[].recentSections |
Typestring[] | DescriptionRecent dialog sections that contain the chat |
Response example
{
"success": true,
"data": {
"anchors": [
{
"chatId": 1945,
"messageId": 846,
"fromUserId": 7,
"type": "reaction",
"subType": "like",
"parentChatId": 0,
"parentMessageId": 0,
"recentSections": ["chat"]
},
{
"chatId": 2001,
"messageId": 845,
"fromUserId": 9,
"type": "mention",
"subType": null,
"parentChatId": 2000,
"parentMessageId": 840,
"recentSections": ["chat", "copilot"]
}
]
}
}
Error response example
400 — a query parameter was passed:
{
"success": false,
"error": {
"code": "INVALID_PARAMS",
"message": "Query parameter `limit` is not accepted by GET /v1/chats/anchors. It takes no query parameters."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
DescriptionA query parameter was passed. Checked before any call to Bitrix24 |
| HTTP422 | CodeMETHOD_NOT_YET_AVAILABLE |
DescriptionThe method is not yet available on the portal. The minimum module version is in error.release |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 returned an error. The portal code is in error.b24Code when recognized |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionBitrix24 returned "not found". The portal code is in error.b24Code |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key does not have the im scope |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no Bitrix24 tokens configured |
The full list of common API errors — Errors.
Known specifics
The complete set in one call. There is no pagination, filtering or record limit. Anchors are ordered by messageId, highest first.
Message access is checked when reading the message. The list may retain anchors for messages you cannot access. A mark does not guarantee that navigation can open the message.
Reading does not change state. The call does not remove anchors, mark messages read or join chats. Remove marks by message or for the entire chat.