Skip to content

Get poll

GET
/api/polls/{pollId}
curl --request GET \
--url http://localhost:3001/api/polls/example \
--header 'Authorization: <Authorization>'

Retrieve a specific poll by ID with its current voting results

pollId
required
string

Poll ID

OK

Media typeapplication/json
object
message
string
poll
object
allows_multiple
boolean
created_at
string
creator_address
string
expires_at
string
has_voted
boolean
id
string
is_expired
boolean
options
Array<object>
object
has_voted

Whether current user voted for this option

boolean
id
string
poll_id
string
text
string
vote_count
integer
question
string
total_votes
integer
success
boolean
Examplegenerated
{
"message": "example",
"poll": {
"allows_multiple": true,
"created_at": "example",
"creator_address": "example",
"expires_at": "example",
"has_voted": true,
"id": "example",
"is_expired": true,
"options": [
{
"has_voted": true,
"id": "example",
"poll_id": "example",
"text": "example",
"vote_count": 1
}
],
"question": "example",
"total_votes": 1
},
"success": true
}

Bad Request

Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{
"error": "example",
"success": true
}

Unauthorized

Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{
"error": "example",
"success": true
}

Not Found

Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{
"error": "example",
"success": true
}