Poll Post
To create a poll post, you need to create a poll first and then attach the newly created poll to a post by passing pollId in data property.

Create a Poll

Create Poll Post
It allows you to create a poll with these inputs:
  • question - a question which can be up to 500 characters
  • answers - a set of two to ten answers. Each answer can be up to 200 characters.
  • answerType - indicator whether the poll allows multiple choices. Default type is "single".
  • closedIn - a time window in milliseconds which tells how many milliseconds this poll will last. Default time is 60*60*1000 milliseconds (60 minutes)

Create Poll Post

Create Poll Post

Vote Poll

This API allows you to vote only once and it cannot be undone. However, you can have multiple choices if the poll type is .multiple.
Vote a Poll

Close a Poll

Only the owner/creator of a poll can close a poll before the closing time.
Close a Poll

Delete a Poll

Only the owner/creator of a poll can close a poll before the closing time.
Delete a Poll

Observe Poll

As well as getting a poll, you may also interact with a poll using an observer pattern through observePoll.
Last modified 1mo ago
Export as PDF
Copy link
Outline
Create a Poll
Create Poll Post
Vote Poll
Close a Poll
Delete a Poll
Observe Poll