The polls feature provides an easier way to gather feedback from members in a channel. To post a poll in a channel, you must send a message that contains the poll you created. Polls can only be sent with text messages in certain group channels. See the limitations section below to learn more about which type of channels and messages support polls.
The following are some of the ways that polls can be customized.
Allow users to vote for a single option or multiple options.
Allow users other than the creator of the poll to add new options.
Display a partial list of voters for each option.
Add data which can contain additional information such as a supplementary explanation for each poll option in a key-value pair.
Using polls
Prerequisite
To use polls in your Sendbird application, you must activate the feature on Sendbird Dashboard. Go to Settings > Chat > Features and turn on the Polls feature.
Limitations
Refer to the following limitations when using polls.
The maximum number of options that can be added to a poll differs depending on your Sendbird plan. For further information, contact our sales team.
Polls can't be sent in the following message types: file messages, admin messages, and scheduled text messages.
Polls are only available in group channels except for ephemeral and Supergroup channels. See channel types to learn more about the different types of group channels.
Information on polls isn't included in the export result of the message data that contain polls.
The time when a poll was closed or will be closed in Unix seconds. If the value of this property is -1, the poll status remains open.
data
object
A JSON object of one or more key-value items to store additional information related to a poll.
List of properties in a poll option
Property name
Type
Description
poll_id
integer
The unique ID of a poll that a poll option belongs to.
id
integer
The unique ID of a poll option. This value is unique within a poll.
text
string
The text that describes a poll option.
vote_count
integer
The number of votes casted on a poll option.
created_by
string
The unique ID of the user who created a poll option.
created_at
long
The time when a poll option is created in Unix seconds.
updated_at
long
The time when a poll option is updated in Unix seconds.
partial_voter_list
array of objects
An array of users who voted for this poll option. Up to ten users can be shown.
Actions
The following table shows a list of actions supported for polls. API endpoints are relative to the base URL allocated to your Sendbird application. In this page, the base URL for the following endpoints is https://api-{application_id}.sendbird.com/v3.
Note: If you want to know the ID and base URL of your application, sign in to Sendbird Dashboard, go to Settings > Application > General, and check the Application ID and API request URL.