Actions50
- Account Actions
- Group Actions
- Journal Actions
- Queue Actions
- Sending Actions
- Service Actions
- Status Actions
- Receiving Actions
Sending → sendPoll
AI-generatedSummary
Send a poll message to a specified WhatsApp chat.
Inputs
- chatId (required) — The ID of the chat to send the poll to, formatted as '79000000000@c.us'.
- quotedMessageId — The ID of a message to quote within the poll.
- message (required) — The text of the poll question.
- options (required) — The options for the poll, defined as a collection of option names.
- multipleAnswers (required) — Indicates whether multiple selections are allowed in the poll.
Output shape
an array of results indicating the success of the poll message sending
Returns an acknowledgment of the poll sent, any potential errors will be included.
Examples
Example 1: Sending a single-choice poll to a specific chat
Set chatId, message, options for poll answers, and multipleAnswers as false.
Example 2: Sending a multiple-choice poll with a quoted message
Provide chatId, message, options, and set multipleAnswers as true, including a quotedMessageId.