POST
Send Poll
Send a poll message. Supported for contacts and groups (not channels). Requires the Message templates plan feature.
API endpoint
https://api.waclient.com/sendExample:
curl -X POST \
'https://api.waclient.com/send' \
-H 'Content-Type: application/json' \
--data '{
"number": "201234567890",
"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 | Provide one. number = digits only (201234567890). chat_id = JID with @ — Phone: [email protected]. Group: 120363…@g.us. Channel: 120363…@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 |