> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wadial.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Post and read channel messages

> Post, edit, delete, react to, vote on, and read channel messages.

## Post a text message

```http theme={null}
POST /api/v1/sessions/{sessionId}/newsletters/{newsletterJid}/messages
Authorization: Bearer <api_key>
Content-Type: application/json
```

```json theme={null}
{
  "text": "Version 2.1 is now available."
}
```

## Read messages and updates

```http theme={null}
GET /api/v1/sessions/{sessionId}/newsletters/{newsletterJid}/messages?count=50
GET /api/v1/sessions/{sessionId}/newsletters/{newsletterJid}/message-updates?count=50
Authorization: Bearer <api_key>
```

Optional query parameters: `before`, `after`, `since`, and `viewRole`.

## Edit or delete a post

```http theme={null}
PATCH /api/v1/sessions/{sessionId}/newsletters/{newsletterJid}/messages/{messageId}
Authorization: Bearer <api_key>
Content-Type: application/json
```

```json theme={null}
{ "text": "Corrected announcement." }
```

```http theme={null}
DELETE /api/v1/sessions/{sessionId}/newsletters/{newsletterJid}/messages/{messageId}
Authorization: Bearer <api_key>
```

## React, vote, and view receipts

```http theme={null}
POST /api/v1/sessions/{sessionId}/newsletters/{newsletterJid}/messages/react
Authorization: Bearer <api_key>
Content-Type: application/json
```

```json theme={null}
{
  "parentMessageServerId": 12345,
  "reactionCode": "🔥"
}
```

Poll vote:

```http theme={null}
POST /api/v1/sessions/{sessionId}/newsletters/{newsletterJid}/messages/poll/vote
Authorization: Bearer <api_key>
Content-Type: application/json
```

```json theme={null}
{
  "parentMessageServerId": 12345,
  "votesBase64": ["base64-vote-hash"]
}
```

View receipt:

```http theme={null}
POST /api/v1/sessions/{sessionId}/newsletters/{newsletterJid}/messages/view-receipt
Authorization: Bearer <api_key>
Content-Type: application/json
```

```json theme={null}
{
  "itemServerIds": [12345]
}
```

## Live updates

```http theme={null}
POST /api/v1/sessions/{sessionId}/newsletters/{newsletterJid}/live-updates
Authorization: Bearer <api_key>
```
