Skip to content

Updates an existing poll.

PATCH
/api/polls/{pollId}

This can change a poll's title, description, and options. Updating is only possible before the voting phase starts

Authorizations

api_key

Requests manipulating data need to supply a CSRF token

TypeAPI Key (header: X-CSRF-Token)

Parameters

Path Parameters

pollId*
Typestring
Required
Pattern"[1-9][0-9]*"

Request Body

application/json
JSON
{
"name": "Test poll",
"description": "This is a new description of the poll.",
"options": undefined,
"shuffleOptions": true
}

Responses

Success

application/json
JSON
{
"id": -1,
"name": "",
"description": "",
"startDate": "string",
"endDate": "string",
"regionId": -1,
"scope": -1,
"type": -1,
"authorId": -1,
"creationDate": "string",
"numValues": 0,
"votes": 0,
"eligibleVotesCount": 0,
"shuffleOptions": true
}

Playground

Authorization
Variables
Key
Value
Body

Samples

cURL
JavaScript
PHP
Python