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

Request

  • Base URL: https://waapi.app/api/v1
  • URL: https://waapi.app/api/v1/instances/{id}/client/action/create-poll
  • Auth: HTTP bearer

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

Request reached the instance. data.status reports whether the action was carried out; on error data carries message and explanation. Payload: Poll created and sent successfully.

status'success' | 'error'

Whether the request reached the instance. success here does not mean the action was carried out — that is reported by data.status, which is the authoritative one. A malformed input arrives as status: success with data.status: error.

Example response

{
  "status": "success",
  "data": {
    "status": "success",
    "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"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.