Messages
Send Poll Message
POST
/api/v1/chat/send/pollSend a poll to a group.
Parameters
- groupstringRequired
The group id, ending in @g.us.
- headerstringRequired
The poll question.
- optionsarrayRequired
The answers people can pick.
- selectableCountintegerOptional
How many answers each person may pick: 1 (default), 0 for any number.
- IdstringOptional
Your own id for the message.
| Name | Type | Required | Description |
|---|---|---|---|
| group | string | Yes | The group id, ending in @g.us. |
| header | string | Yes | The poll question. |
| options | array | Yes | The answers people can pick. |
| selectableCount | integer | No | How many answers each person may pick: 1 (default), 0 for any number. |
| Id | string | No | Your own id for the message. |
Code Examples
cURL
curl -X POST "https://orvachat.com/api/v1/chat/send/poll" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"group": "[email protected]",
"header": "Which day?",
"options": [
"Saturday",
"Sunday"
],
"selectableCount": 1
}'Response Example
200 OK
{
"code": 200,
"data": {
"Details": "Sent",
"Id": "90B2F8B13FAC8A9CF6B06E99C7834DC5",
"Timestamp": "2022-04-20T12:49:08-03:00"
},
"success": true
}