The Chat module groups everything that happens after a message comes in or goes out: contact management, organization with labels, chat state control (archive, pin, mute, block), and actions on individual messages (edit, delete, forward, favorite). It is the broadest module in the API: from a simple call like “list contacts” to complete flows like “create a label, assign it to several chats, then list everything that has that label”.Documentation Index
Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt
Use this file to discover all available pages before exploring further.
Every route accepts TokenAccount or TokenInstance and validates instance ownership before operating.
Endpoints
| Method | Path | Function |
|---|---|---|
| GET | /api/chat/contacts/:instance | List/search contacts |
| GET | /api/chat/contactsByLabel/:instance | Chats filtered by label |
| GET | /api/chat/getMessage/:instance | Find message by ID |
| GET | /api/chat/tag/:instance | List labels |
| POST | /api/chat/tag/:instance | Create label |
| DELETE | /api/chat/tag/:instance | Delete label |
| POST | /api/chat/assignTag/:instance | Apply label to chat |
| DELETE | /api/chat/assignTag/:instance | Remove label from chat |
| POST | /api/chat/archive/:instance | Archive/unarchive |
| POST | /api/chat/markRead/:instance | Mark message as read |
| POST | /api/chat/markChatRead/:instance | Mark entire chat as read |
| POST | /api/chat/pin/:instance | Pin/unpin |
| POST | /api/chat/favorite/:instance | Favorite chat or message |
| POST | /api/chat/mute/:instance | Mute |
| POST | /api/chat/block/:instance | Block/unblock contact |
| POST | /api/chat/presence/:instance | Send presence (typing/recording) |
| POST | /api/chat/history/:instance | Chat history |
| GET | /api/chat/base64/:instance | Media as base64 |
| GET | /api/chat/status/:instance | Message delivery status |
| GET | /api/chat/poll/:instance | Poll votes |
| POST | /api/chat/forward/:instance | Forward message |
| POST | /api/chat/edit/:instance | Edit message |
| DELETE | /api/chat/delete/:instance | Delete message |
| DELETE | /api/chat/deleteChat/:instance | Delete entire chat |
Contacts
Query synced contacts and filter by labels.List contacts
GET /api/chat/contacts/:instanceContacts by label
GET /api/chat/contactsByLabel/:instanceLabels (tags / labels)
Create labels, apply them to chats, and use them as filters, exactly what WhatsApp Business allows, but via API.List labels
GET /api/chat/tag/:instanceCreate label
POST /api/chat/tag/:instanceDelete label
DELETE /api/chat/tag/:instanceAssign label
POST /api/chat/assignTag/:instanceUnassign label
DELETE /api/chat/assignTag/:instanceChat state
Control how each conversation appears to the WhatsApp user, archive, pin, mute, favorite, block.Archive chat
POST /api/chat/archive/:instancePin chat
POST /api/chat/pin/:instanceMute chat
POST /api/chat/mute/:instanceFavorite chat or message
POST /api/chat/favorite/:instanceBlock / unblock
POST /api/chat/block/:instanceRead
Mark message as read
POST /api/chat/markRead/:instanceMark chat as read
POST /api/chat/markChatRead/:instancePresence
Send presence (typing/recording)
POST /api/chat/presence/:instance, shows typing or recording to the contact.History
Request history
POST /api/chat/history/:instance, stored messages with optional date filters.Messages
Actions on specific messages, plus utilities to download media, read polls, and check delivery status.Find message by ID
GET /api/chat/getMessage/:instanceForward message
POST /api/chat/forward/:instanceEdit message
POST /api/chat/edit/:instanceDelete message
DELETE /api/chat/delete/:instanceDelete entire chat
DELETE /api/chat/deleteChat/:instanceMedia as base64
GET /api/chat/base64/:instanceDelivery status
GET /api/chat/status/:instancePoll votes
GET /api/chat/poll/:instanceAccepted identifiers
Most endpoints accept the same formats to identify a chat or destination. The table below summarizes them:| Endpoint | Accepts |
|---|---|
Most (number) | Number (5511...), private JID (...@s.whatsapp.net or ...@lid), group JID (...@g.us), newsletter JID |
markRead in groups | Requires sender (JID of the message author, ...@s.whatsapp.net or ...@lid) |
forward (to) | Same set as number |
About
@lid (LinkedID): an alternative identifier WhatsApp uses for individual users when the phone number is not exposed (privacy in communities, large groups, etc.). It is equivalent to ...@s.whatsapp.net for routing purposes, any endpoint that accepts a private JID also accepts @lid. Use the exact JID coming from a webhook or previous API responses; do not try to convert @lid into a number.WhatsApp windows
| Action | Limit |
|---|---|
| Edit message | ~15 minutes after sending |
Delete for everyone (deleteForEveryone: true) | ~2 days after sending |
| After the window | Local deletion only (delete_for_me) |
Usage patterns
Label workflow
Moderation workflow
Related
Send messages
Send content before managing it.
Real-time events
Webhooks
message.exchange, message.status, and label.update.