Vote on a poll message
Replace your poll vote.
Use options for the full set of selected choices. Send empty list to clear vote.
Returns 200 with a SendResult.
Errors: validation_error for bad poll/options and not_found for missing message or session.
Send Authorization: Bearer <token>. The token can be a login JWT from the frontend or an api-key for a script. JWT access comes from the person's organization role. Api-key access comes from the permissions saved on the key.
In: header
Path Parameters
WhatsApp session id casting the vote. Must be owned and connected.
"01HZX..."WhatsApp message id of the poll.
"3EB0C431C26A1916E07A"Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Chat JID of the poll.
"120363012345678901@g.us"Complete list of selected options. Send empty list to clear vote.
Example
[ "Pizza", "Sushi"]Poll sender JID.
""Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/sessions/01HZX.../messages/3EB0C431C26A1916E07A/vote" \ -H "Content-Type: application/json" \ -d '{}'{ "mode": "string", "outboxId": "string", "replayed": true, "status": "string", "timestamp": 0, "waMessageId": "string"}{ "error": { "code": "not_found", "details": { "property1": null, "property2": null }, "message": "session not found" }}