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

# Messaging

> SDK resources for messaging: direct and mass messages, chats, and notifications.

| Resource           | What it covers                                                                                                                                                                                                                                                                                           |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `of.messages`      | Direct + mass messaging: `list`, `send`, `delete`, `markRead`, `search`, per-message reactions (`like`, `unlike`, `pin`, `unpin`, `hide`), templates, mass-message queue lifecycle (`queueCreate`, `queueUpdate`, `queueCancel`, `queueSize`, `queueBuyers`, `queueChart`), reply-on-subscribe template. |
| `of.chats`         | Chat list, retrieve, mark-read / mark-unread (single + batch), priority counts, `mediaGallery`, `searchMessages`, `retrieveMessage`, delete chat, unpin all.                                                                                                                                             |
| `of.notifications` | List, count, mark-all-read, transports, per-category settings.                                                                                                                                                                                                                                           |

## Recipes

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
const chats = await of.chats.list({ limit: 20, order: "recent" });
const first = chats.list[0];

const msgs = await of.messages.list(first.withUser.id, { limit: 30 });

await of.messages.send(first.withUser.id, {
  text: "Hi!",
  // mediaFiles: [...], price: 0, lockedText: false   // for paid messages
});
```

See the [Messaging guide](/guides/messaging) for end-to-end flows and
[Mass messaging](/guides/mass-messaging) for campaigns.
