Skip to content

Creates a new poll. The poll and all its options will be assigned valid IDs and option indices by the server. Options must be passed as an array of strings for the options' texts. The order of the options will be kept.

POST
/api/polls

Authorizations

api_key

Requests manipulating data need to supply a CSRF token

TypeAPI Key (header: X-CSRF-Token)

Request Body

application/json
JSON
{
"name": "Test poll",
"description": "This is a test poll",
"startDate": undefined,
"endDate": undefined,
"regionId": 1,
"scope": 1,
"type": 1,
"options": undefined,
"notifyVoters": true,
"shuffleOptions": true
}

Responses

Success

Playground

Authorization
Body

Samples

cURL
JavaScript
PHP
Python