Respond to a poll
Method#
/send-poll#
POST https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/send-poll-vote
Header#
| Key | Value | 
|---|---|
| Client-Token | ACCOUNT SECURITY TOKEN | 
Concept#
In this method, you can vote in a specific poll.
Attributes#
Required#
| Attribute | Type | Description | 
|---|---|---|
| phone | string | Recipient's phone number (or group ID for group sending) in the format DDI DDD NUMBER. Example: 551199999999. IMPORTANT: Send only numbers, without formatting or masks. | 
| pollMessageId | string | ID of the poll message. IMPORTANT: This is the messageId received when sending a poll or receiving it from another contact. | 
| pollVote | pollVote | List of options to vote for. IMPORTANT: You can vote for more than one option. | 
PollVote#
| Attribute | Type | Description | 
|---|---|---|
| name | string | Option name | 
Request Body#
Response#
200#
| Attributes | Type | Description | 
|---|---|---|
| zaapId | string | id on z-api | 
| messageId | string | id on whatsapp | 
Example
405#
In this case certify that you are sending the correct specification of the method. This means, verify if you sent a POST or GET as specified at the beginning of this topic.
415#
In case you receive 415 error, make sure to add the “Content-Type” of the object you are sending in the request headers, mostly “application/json”
Webhook Response#
Webhook response link (upon receiving)