v1

latestOpenAPI 3.1.02026-07-1413113265.9 KB
message

create poll message

Creates and sends an interactive poll message to a specified chat. The poll can have between 2-12 options and optionally allow multiple selections.

post/instances/{id}/client/action/create-poll

Path parameters

idinteger required

Instance ID

Request body

chatIdstring required

Chat ID <countrycode_short><usernumber>@c.us or @g.us for groups

captionstring required

The poll question or caption text

optionsstring[] required

Array of poll options. Must contain between 2 and 12 options.

multipleAnswersboolean

When true, allows participants to select multiple options

Example request

{
  "chatId": "50664083362@c.us",
  "caption": "What's your favorite color?",
  "options": [
    "Red",
    "Blue",
    "Green"
  ]
}

Response

Poll created and sent successfully

status'success' | 'error'
instanceIdstring

Example response

{
  "status": "success",
  "instanceId": "1",
  "data": {
    "id": {
      "fromMe": true,
      "remote": "1234567890@c.us",
      "id": "ABCDEF1234567890",
      "_serialized": "true_1234567890@c.us_ABCDEF1234567890"
    },
    "body": "What's your favorite color?",
    "type": "poll_creation",
    "timestamp": 1738861768,
    "from": "1234567890@c.us",
    "to": "0987654321@c.us",
    "pollName": "What's your favorite color?",
    "pollOptions": [
      {
        "name": "Red"
      }
    ]
  },
  "links": {
    "self": "https://waapi.app/api/v1/instances/1/client/action/create-poll"
  }
}