For AI agents: markdown of this page — /docs-content-en/chats/messages/personal-pins.md documentation index — /llms.txt
Get personal pinned messages
GET /v1/chats/:dialogId/pins/personal
Returns, page by page, the messages that the current user has pinned for themselves in one chat.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ParameterdialogId (path) |
Typestring | Requiredyes | Descriptionchat followed by the actual chat ID returned when you load the chat, including a one-to-one chat. The endpoint rejects a numeric user ID and me. |
Parameterlimit (query) |
Typeinteger | Requiredno | DescriptionRows per page: 1–200, default 50. For out-of-range values, meta.requestedLimit shows the requested limit and meta.appliedLimit shows the limit used. |
ParameterlastId (query) |
Typeinteger | Requiredno | DescriptionExclusive cursor: messageId of the last row of the previous page |
Parameterorder (query) |
Typestring | Requiredno | Descriptiondesc by default, or asc |
Requires the im scope. The credentials identify the current user. The API rejects parameters that specify the owner and any unknown parameters. If the chat allows auto-join, this request can add the user as a chat member.
Examples
curl — personal key
curl -X GET "https://vibecode.bitrix24.com/v1/chats/chat1945/pins/personal" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X GET "https://vibecode.bitrix24.com/v1/chats/chat1945/pins/personal" \
-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/chat1945/pins/personal', {
method: 'GET',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const { data } = await res.json()
console.log(data)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/chat1945/pins/personal', {
method: 'GET',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { data } = await res.json()
console.log(data)
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | Descriptiontrue |
Fielddata.personalPins |
Typearray | DescriptionPersonal pin rows |
Fielddata.personalPins[].id |
Typenumber | DescriptionPin row id |
Fielddata.personalPins[].messageId |
Typenumber | DescriptionMessage id and pagination cursor |
Fielddata.personalPins[].chatId |
Typenumber | DescriptionReal chat id |
Fielddata.personalPins[].authorId |
Typenumber | DescriptionPin owner id |
Fielddata.personalPins[].dateCreate |
Typestring | DescriptionPin creation date |
Fielddata.hasNextPage |
Typeboolean | DescriptionWhether another page is available |
Fielddata.messages, data.additionalMessages |
Typearray | DescriptionThe pinned messages: id, chatId, authorId, date, text, isSystem. Not every response includes each of the two fields |
Fielddata.users |
Typearray | DescriptionRelated users |
Fielddata.files, data.reactions, data.stickers |
Typearray | DescriptionFiles, reactions and stickers of the pinned messages. Not every response includes them: an empty page omits them |
Fielddata.tariffRestrictions.isHistoryLimitExceeded |
Typeboolean | Descriptiontrue when the plan hides part of the older chat history and its messages are left out of the results |
Fieldmeta.requestedLimit |
Typenumber | DescriptionThe limit that was sent. Returned together with appliedLimit, only when the value was outside the range from 1 to 200 |
Fieldmeta.appliedLimit |
Typenumber | DescriptionThe applied limit value — only when it was clamped to a bound |
Response example
Only the main message and user fields are shown.
{
"success": true,
"data": {
"personalPins": [
{
"id": 12,
"messageId": 846,
"chatId": 1945,
"authorId": 7,
"dateCreate": "2026-11-17T10:05:00+00:00"
},
{
"id": 11,
"messageId": 845,
"chatId": 1945,
"authorId": 7,
"dateCreate": "2026-11-17T10:04:00+00:00"
}
],
"additionalMessages": [
{"id": 846, "chatId": 1945, "authorId": 12, "date": "2026-11-16T09:30:00+00:00", "text": "Release notes are ready", "isSystem": false},
{"id": 845, "chatId": 1945, "authorId": 12, "date": "2026-11-16T09:28:00+00:00", "text": "Project update", "isSystem": false}
],
"users": [{"id": 12, "active": true, "name": "Anna Smith", "type": "user"}],
"files": [],
"reactions": [],
"stickers": [],
"tariffRestrictions": {"isHistoryLimitExceeded": false},
"hasNextPage": false
}
}
Error response example
400 — unexpected parameter:
{
"success": false,
"error": {
"code": "INVALID_PARAMS",
"message": "Query parameter `ownerId` is not accepted by GET /v1/chats/:dialogId/pins/personal. Accepted: lastId, order, limit."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
DescriptionMalformed ID, or an unexpected or repeated parameter or body field |
| HTTP422 | CodeBITRIX_ERROR |
Descriptionerror.b24Code is CHAT_NOT_FOUND — there is no chat with this id |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionNo API key was provided |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionNo Bitrix24 credentials are configured |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key does not have im scope |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionThe key is in READONLY mode and is not an ordinary employee personal key: an application key with a user session, a management key, or a key of an unconfirmed type. Checked before any call to Bitrix24 |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionThe current user has no access |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionThe record was not found |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 refused the operation with another code, which is in error.b24Code |
Known specifics
On full chat load, the initial personal pin block is in data: personalPins and personalPinsHasNextPage. Use this endpoint for pagination. If the block is absent on a full load, personal pins are unsupported. An empty list is returned as personalPins: [].