List polls
GET
/cms/poll
const url = 'https://api.example.com/cms/poll';const options = {method: 'GET', headers: {'API-Key': '<API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.example.com/cms/poll \ --header 'API-Key: <API-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”page
integer
limit
integer
Responses
Section titled “Responses”List of polls
Media typeapplication/json
Array<object>
PollAPI representation of a poll
object
id
Poll ID (numeric string)
string
timestamp
Timestamp, MySQL datetime (Y-m-d H:i:s)
string
question
Question
string
choices
Choices
Array<object>
object
num
Choice number
integer
text
Choice text
string
image_url
Choice image URL (only when the choice has an image)
string
votes
Votes
integer
slug
Slug
string
category
PollCategory
API representation of a poll category
object
id
Category ID (numeric string)
string
name
Name
string
results
Results, keyed by choice number, plus a total key with the total number of votes
message
Message
string
onlyLoggedIn
Only logged in (“0” or “1”)
string
endDate
End date
string
voted
Voted (only true when voting)
boolean
voted_choice
closed
Closed (“0” or “1”)
string
Example
[ { "id": "7", "timestamp": "2024-12-17 16:32:19", "choices": [ { "num": 1, "text": "I like this" } ], "category": { "id": "1" }, "image": false, "results": { "1": { "value": 16, "percentage": "100.0" }, "2": { "value": 0, "percentage": "0.0" }, "total": 16 }, "onlyLoggedIn": "0", "voted_choice": false, "closed": "0" }]