Channels
Manage WhatsApp channels (Newsletter) with Wazend: list, create, search, delete and send messages to channels.
WhatsApp channels (also called Newsletter) let you broadcast messages to a large number of followers. With Wazend you can list, create, search and send messages to channels.
List channels
GET /api/{session}/channels?role=OWNERThe role parameter can be OWNER, ADMIN or SUBSCRIBER.
[
{
"id": "123456789@newsletter",
"name": "Mi Canal",
"description": "Channel description",
"invite": "https://whatsapp.com/channel/...",
"preview": "https://...",
"picture": "https://...",
"verified": false,
"role": "OWNER"
}
]Create channel
POST /api/{session}/channels{
"name": "Mi Canal",
"description": "Channel description",
"picture": {
"mimetype": "image/jpeg",
"filename": "portada.jpg",
"url": "https://ejemplo.com/portada.jpg"
}
}Get channel
GET /api/{session}/channels/{id}You can also get a channel by its invite code:
GET /api/{session}/channels/{inviteCode}Search public channels
POST /api/{session}/channels/search/by-text{
"text": "noticias",
"categories": [],
"limit": 20,
"startCursor": null
}Send and read channel messages
To send messages to a channel use the send endpoints (e.g. POST /api/sendText) with the chatId with the @newsletter suffix. To read messages use:
GET /api/{session}/chats/{chatId}/messagesDelete channel
DELETE /api/{session}/channels/{id}