message

get poll votes

Retrieves the vote information for a specific poll message, including who voted for which options and the original poll message details.

post/instances/{id}/client/action/get-poll-votes

Request

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

Path parameters

idinteger required

Instance ID

Request body

messageIdstring required

Serialized message identifier of the poll message

Example request

{
  "messageId": "true_1234567890@c.us_ABCDEF1234567890_out"
}

Response

Request reached the instance. data.status reports whether the action was carried out; on error data carries message and explanation. Payload: Poll votes retrieved 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": {
      "messageId": "true_1234567890@c.us_ABCDEF1234567890_out",
      "votes": [
        {
          "voter": "1234567890@c.us",
          "selectedOptions": [
            {
              "name": "Green",
              "localId": 2
            }
          ],
          "interractedAtTs": 1700000000000,
          "parentMessage": {
            "id": {
              "fromMe": true,
              "remote": "1234567890@c.us",
              "id": "ABCDEF1234567890",
              "_serialized": "true_1234567890@c.us_ABCDEF1234567890_out"
            },
            "ack": 3,
            "body": "What's your favorite color?",
            "type": "poll_creation",
            "from": "1234567890@c.us",
            "to": "1234567890@c.us",
            "pollName": "What's your favorite color?",
            "pollOptions": [
              {
                "name": "Red",
                "localId": 0
              },
              {
                "name": "Blue",
                "localId": 1
              },
              {
                "name": "Green",
                "localId": 2
              }
            ]
          }
        }
      ]
    }
  }
}

Changes

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