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

Type
API Key (header: X-CSRF-Token)

Parameters​

Path Parameters

pollId*
Type
integer
Required
Minimum
1

Request Body​

application/json
JSON
{
  
"name": "Test poll",
  
"description": "This is a new description of the poll.",
  
"options": [
  
  
"string"
  
],
  
"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​