curl --request POST \
--url https://api.zapkey.io/message/sendPoll/{instance} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"number": "<string>",
"pollMessage": {
"name": "<string>",
"selectableCount": 2,
"values": [
"<string>"
]
},
"options": {
"delay": 123,
"presence": "composing"
}
}
'{
"key": {
"remoteJid": "[email protected]",
"fromMe": true,
"id": "BAE53EC8D8E1FD8A"
},
"message": {
"messageContextInfo": {
"messageSecret": "lX/+cLHHNfnTTKZi+88mrhoyi6KNuUzWjgfaB0bTfOY="
},
"pollCreationMessage": {
"name": "Poll Name",
"options": [
{
"optionName": "Option 1"
},
{
"optionName": "Option 2"
},
{
"optionName": "Option 3"
}
],
"selectableOptionsCount": 1
}
},
"messageTimestamp": "1717781848",
"status": "PENDING"
}Send Poll
curl --request POST \
--url https://api.zapkey.io/message/sendPoll/{instance} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"number": "<string>",
"pollMessage": {
"name": "<string>",
"selectableCount": 2,
"values": [
"<string>"
]
},
"options": {
"delay": 123,
"presence": "composing"
}
}
'{
"key": {
"remoteJid": "[email protected]",
"fromMe": true,
"id": "BAE53EC8D8E1FD8A"
},
"message": {
"messageContextInfo": {
"messageSecret": "lX/+cLHHNfnTTKZi+88mrhoyi6KNuUzWjgfaB0bTfOY="
},
"pollCreationMessage": {
"name": "Poll Name",
"options": [
{
"optionName": "Option 1"
},
{
"optionName": "Option 2"
},
{
"optionName": "Option 3"
}
],
"selectableOptionsCount": 1
}
},
"messageTimestamp": "1717781848",
"status": "PENDING"
}Your authorization key header
ID of the instance to connect
Number to receive the message (with country code)
Created
The message content, which may include various types of messages like text, images, poll creation, etc.
Show child attributes
Details of the poll creation message.
Show child attributes
The name of the poll.
The number of options that can be selected in the poll.
The timestamp of the message, represented as a string.
The status of the message, such as sent, received, or pending.