Skip to main content

Creating a poll

A new poll can be created using the create method from the meeting.polls object. The meeting.polls.create() method accepts the following params.

ParamTypeDefault ValueRequiredDescription
questionstring-yesThe question that is to be voted for.
optionsstring[]-yesThe options of the poll.
anonymousbooleanfalsenoIf true, the poll votes are anonymous.
hideVotesbooleanfalsenoIf true, the votes on the poll are hidden.

The following snippet creates a poll where votes are anonymous.

await meeting.poll.create(
'Are you an early bird or a night owl?',
['Early bird', 'Night owl'],
true
);