polls
View and vote on polls attached to statuses. To discover poll ID, you will need to GET a Status first and then check for a `poll` property.
View a poll
GET
https://mastodon.example/api/v1/polls/:id
Returns: Poll
OAuth: Public if parent status is public. User token + read:statuses
if parent status is private.
Version history:
2.8.0 - added
Path Parameters
Name
Type
Description
:id
string
ID of the poll in the database
Vote on a poll
POST
https://mastodon.example/api/v1/polls/:id/votes
Returns: Poll
OAuth: User token + write:statuses
Version history:
2.8.0 - added
Path Parameters
Name
Type
Description
:id
string
ID of the poll in the database
Headers
Name
Type
Description
Authorization
string
Bearer <user token>
Request Body
Name
Type
Description
choices[]
array
Array of own votes containing index for each option (starting from 0)
Last updated
Was this helpful?