## 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 |
|-----------|------|----------|-------------|
| `dialogId` (path) | string | yes | `chat` followed by the actual chat ID returned when you [load the chat](/docs/chats/messages/load), including a one-to-one chat. The endpoint rejects a numeric user ID and `me`. |
| `limit` (query) | integer | no | Rows per page: 1–200, default 50. For out-of-range values, `meta.requestedLimit` shows the requested limit and `meta.appliedLimit` shows the limit used. |
| `lastId` (query) | integer | no | Exclusive cursor: `messageId` of the last row of the previous page |
| `order` (query) | string | no | `desc` 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

```bash
curl -X GET "https://vibecode.bitrix24.com/v1/chats/chat1945/pins/personal" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
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

```javascript
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

```javascript
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 |
|-------|------|-------------|
| `success` | boolean | `true` |
| `data.personalPins` | array | Personal pin rows |
| `data.personalPins[].id` | number | Pin row id |
| `data.personalPins[].messageId` | number | Message id and pagination cursor |
| `data.personalPins[].chatId` | number | Real chat id |
| `data.personalPins[].authorId` | number | Pin owner id |
| `data.personalPins[].dateCreate` | string | Pin creation date |
| `data.hasNextPage` | boolean | Whether another page is available |
| `data.messages, data.additionalMessages` | array | The pinned messages: `id`, `chatId`, `authorId`, `date`, `text`, `isSystem`. Not every response includes each of the two fields |
| `data.users` | array | Related users |
| `data.files, data.reactions, data.stickers` | array | Files, reactions and stickers of the pinned messages. Not every response includes them: an empty page omits them |
| `data.tariffRestrictions.isHistoryLimitExceeded` | boolean | `true` when the plan hides part of the older chat history and its messages are left out of the results |
| `meta.requestedLimit` | number | The `limit` that was sent. Returned together with `appliedLimit`, only when the value was outside the range from 1 to 200 |
| `meta.appliedLimit` | number | The applied `limit` value — only when it was clamped to a bound |

## Response example

Only the main message and user fields are shown.

```json
{
  "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:

```json
{
  "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 |
|------|------|-------------|
| 400 | `INVALID_PARAMS` | Malformed ID, or an unexpected or repeated parameter or body field |
| 422 | `BITRIX_ERROR` | `error.b24Code` is `CHAT_NOT_FOUND` — there is no chat with this id |
| 401 | `MISSING_API_KEY` | No API key was provided |
| 401 | `TOKEN_MISSING` | No Bitrix24 credentials are configured |
| 403 | `SCOPE_DENIED` | The key does not have im scope |
| 403 | `WRITE_BLOCKED_READONLY_KEY` | The 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 |
| 403 | `BITRIX_ACCESS_DENIED` | The current user has no access |
| 404 | `ENTITY_NOT_FOUND` | The record was not found |
| 422 | `BITRIX_ERROR` | Bitrix24 refused the operation with another code, which is in `error.b24Code` |

[Common API errors](/docs/errors).

## Known specifics

On [full chat load](/docs/chats/messages/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: []`.

## See also

- [Chat configuration](/docs/chats/discovery/configuration)
- [Messages](/docs/chats/messages)
