POST
Send Poll
Send a poll message. Supported for contacts and groups (not channels). Requires the Message templates plan feature.
API endpoint
https://waclient.com/api/sendExample:
curl -X POST \
'https://waclient.com/api/send' \
-H 'Content-Type: application/json' \
--data '{
"chat_id": "[email protected]",
"type": "poll",
"message": {
"name": "Favorite?",
"values": [
"A",
"B"
],
"selectableCount": 1
},
"instance_id": "6A4B02A1XXXX",
"access_token": "EMCUH3NQQK8YXXXX"
}'Response
{
"status": "success",
"message": "Success",
"message_payload": {
"key": {
"remoteJid": "[email protected]",
"fromMe": true,
"id": "ABC123"
},
"status": "PENDING"
}
}| Parameter | Description |
|---|---|
| number / chat_id | Recipient phone number (e.g. 20100981XXXX) or chat_id (group: [email protected], channel: xxxx@newsletter) |
| type | Must be poll |
| message / template | Provide either JSON message (custom poll) or template ID (Dashboard) |
| instance_id | Your instance ID |
| access_token | Your access token |