API Reference

Vote Update Event

Description

This event is triggered when a vote is updated in a poll.

Webhook Request

HTTP Method

POST

Request Headers

NameValue
Content-Typeapplication/json
User-AgentWaAPI Webhook User Agent

Request Body

{
  "event": "vote_update",
  "instanceId": "1",
  "data": {
    "vote": {
      "voter": "[email protected]",
      "selectedOptions": [
        {
          "name": "Blue",
          "localId": 1
        }
      ],
      "interractedAtTs": 1738935453113,
      "parentMessage": {
        "_data": {
          "id": {
            "fromMe": true,
            "remote": "[email protected]",
            "id": "AAABBBCCCDDDEEEFFF111222333",
            "_serialized": "[email protected]_AAABBBCCCDDDEEEFFF111222333"
          },
          "viewed": false,
          "body": "",
          "type": "poll_creation",
          "t": 1738935427,
          "from": "[email protected]",
          "to": "[email protected]",
          "ack": 2,
          "isNewMsg": true,
          "star": false,
          "kicNotified": false,
          "isFromTemplate": false,
          "pollName": "What's your favorite color?",
          "pollOptions": [
            {
              "name": "Red",
              "localId": 0
            },
            {
              "name": "Blue",
              "localId": 1
            },
            {
              "name": "Green",
              "localId": 2
            }
          ],
          "pollSelectableOptionsCount": 1,
          "pollInvalidated": false,
          "isSentCagPollCreation": false,
          "latestEditMsgKey": null,
          "latestEditSenderTimestampMs": null,
          "mentionedJidList": [],
          "groupMentions": [],
          "isEventCanceled": false,
          "eventInvalidated": false,
          "isVcardOverMmsDocument": false,
          "isForwarded": false,
          "hasReaction": false,
          "disappearingModeInitiator": "chat",
          "disappearingModeTrigger": "chat_settings",
          "disappearingModeInitiatedByMe": false,
          "messageSecret": {
            "0": 6,
            "1": 4,
            "2": 3,
            "3": 4,
            "4": 2,
            "5": 5,
            "6": 9,
            "7": 0,
            "8": 0,
            "9": 7,
            "10": 7,
            "11": 6,
            "12": 9,
            "13": 4,
            "14": 3,
            "15": 0,
            "16": 7,
            "17": 0,
            "18": 9,
            "19": 1,
            "20": 8,
            "21": 4,
            "22": 4,
            "23": 1,
            "24": 1,
            "25": 8,
            "26": 5,
            "27": 0,
            "28": 6,
            "29": 6,
            "30": 5,
            "31": 8
          },
          "productHeaderImageRejected": false,
          "lastPlaybackProgress": 0,
          "isDynamicReplyButtonsMsg": false,
          "isCarouselCard": false,
          "parentMsgId": null,
          "callSilenceReason": null,
          "isVideoCall": false,
          "isMdHistoryMsg": false,
          "stickerSentTs": 0,
          "isAvatar": false,
          "lastUpdateFromServerTs": 0,
          "invokedBotWid": null,
          "bizBotType": null,
          "botResponseTargetId": null,
          "botPluginType": null,
          "botPluginReferenceIndex": null,
          "botPluginSearchProvider": null,
          "botPluginSearchUrl": null,
          "botPluginSearchQuery": null,
          "botPluginMaybeParent": false,
          "botReelPluginThumbnailCdnUrl": null,
          "botMsgBodyType": null,
          "requiresDirectConnection": false,
          "bizContentPlaceholderType": null,
          "hostedBizEncStateMismatch": false,
          "senderOrRecipientAccountTypeHosted": false,
          "placeholderCreatedWhenAccountIsHosted": false,
          "links": []
        },
        "id": {
          "fromMe": true,
          "remote": "[email protected]",
          "id": "AAABBBCCCDDDEEEFFF111222333",
          "_serialized": "[email protected]_AAABBBCCCDDDEEEFFF111222333"
        },
        "ack": 2,
        "hasMedia": false,
        "body": "What's your favorite color?",
        "type": "poll_creation",
        "timestamp": 1738935427,
        "from": "[email protected]",
        "to": "[email protected]",
        "deviceType": "android",
        "isForwarded": false,
        "forwardingScore": 0,
        "isStatus": false,
        "isStarred": false,
        "fromMe": true,
        "hasQuotedMsg": false,
        "hasReaction": false,
        "vCards": [],
        "mentionedIds": [],
        "groupMentions": [],
        "isGif": false,
        "links": [],
        "pollName": "What's your favorite color?",
        "pollOptions": [
          {
            "name": "Red",
            "localId": 0
          },
          {
            "name": "Blue",
            "localId": 1
          },
          {
            "name": "Green",
            "localId": 2
          }
        ],
        "allowMultipleAnswers": false,
        "pollInvalidated": false,
        "isSentCagPollCreation": false,
        "messageSecret": [
          6,
          4,
          3,
          4,
          2,
          5,
          9,
          0,
          0,
          7,
          7,
          6,
          9,
          4,
          3,
          0,
          7,
          0,
          9,
          1,
          8,
          4,
          4,
          1,
          1,
          8,
          5,
          0,
          6,
          6,
          5,
          8
        ]
      }
    }
  }
}