Vote in a poll. The options need to be a list mapping option indices to the vote values (+1, 0, -1). Depending on the voting type not all options need to be included.
PUT
/api/polls/{pollId}/voteAuthorizations
api_key
Type: API Key (header: X-CSRF-Token)
Parameters
Path Parameters
pollId*
in which poll to vote
Typeinteger
RequiredRequest Body
JSON
{
"options": "string"
}
Responses
Success
Authorization
api_key
Variables
Key
Value
pollId*
cURL
curl -X PUT \
'http://localhost/api/polls/{pollId}/vote' \
--data '{
"options": "string"
}'
Samples
cURL
curl -X PUT http://localhost/api/polls/{pollId}/vote
JavaScript
fetch("http://localhost/api/polls/{pollId}/vote", { method: "PUT" })
.then(response => response.json())
.then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost/api/polls/{pollId}/vote");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.put("http://localhost/api/polls/{pollId}/vote")
print(response.json())