## Follow the comments of a post

`POST /v1/chats/messages/:messageId/comments/subscription`

Subscribes you to notifications about new comments on a channel post.

## Parameters

| Parameter | Type | Required | Default | Description |
|----------|-----|:-----:|-----------|---------|
| `messageId` (path) | number | yes | — | ID of the channel post, a positive integer. Posts of a channel — [Read messages](/docs/chats/messages/list) |

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

## Examples

### curl — personal key

```bash
curl -X POST "https://vibecode.bitrix24.com/v1/chats/messages/845/comments/subscription" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl -X POST "https://vibecode.bitrix24.com/v1/chats/messages/845/comments/subscription" \
  -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/messages/845/comments/subscription', {
  method: 'POST',
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})

const { data } = await res.json()
console.log('Notifications on:', data.result)
```

### JavaScript — OAuth application

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

const { data } = await res.json()
console.log('Notifications on:', data.result)
```

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data.result` | boolean | `true` — you follow the comments of the post |

## Response example

```json
{
  "success": true,
  "data": { "result": true }
}
```

## Error response example

422 — the message is not a channel post:

```json
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "WRONG_PARENT_CHAT",
    "b24Code": "WRONG_PARENT_CHAT"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 400 | `INVALID_PARAMS` | `messageId` is not a positive integer, the body is not a JSON object, a query parameter or a body field is passed. Checked before any call to Bitrix24 |
| 404 | `ENTITY_NOT_FOUND` | Bitrix24 returned a generic "not found" code or an error with the text "not found". The portal code is in `error.b24Code` |
| 422 | `BITRIX_ERROR` | Bitrix24 returned an error, the portal code is in `error.b24Code`. `WRONG_PARENT_CHAT` — the message is not a channel post, `MESSAGE_ACCESS_DENIED` — no access to the message, including when there is no message with this ID |
| 403 | `SCOPE_DENIED` | The API key does not have the `im` scope |
| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only: following changes data — see [access rights](/docs/access-rights) |
| 401 | `TOKEN_MISSING` | The API key has no Bitrix24 tokens configured |

The full list of common API errors — [Errors](/docs/errors).

## Known specifics

**Following means notifications, not events.** It does not deliver comments in real time — for that, [subscribe to events](/docs/chats/events/subscribe).

**The author of a post follows it from the start.** For a post you sent, `isUserSubscribed` in the [comment summary](/docs/chats/messages/comments) is `true` without a follow call. A repeated follow returns `true`.

**The thread appears together with the post.** A thread is created as soon as the post is sent to the channel, before the first comment. A forwarded post has no thread — following creates one, so you can follow any channel post.

## See also

- [Stop following the comments of a post](/docs/chats/messages/comments-subscription-delete)
- [Comment summary for posts](/docs/chats/messages/comments)
- [Mark all channel comments as read](/docs/chats/messages/comments-read-all)
- [Subscribe to events](/docs/chats/events/subscribe)
