Corpo da requisição application/json
titlestring obrigatório max. 255The question.
optionsarray of string obrigatórioThe answers to choose from, at least two (one for meeting polls).
typestringmultiple_choice: pick one option, or several withallowMultiple.ranking: order the options; each place earns points.ranked_choice: rank the options; an instant runoff finds the majority winner.meeting: mark which dates and times work.
Um de:
multiple_choicerankingranked_choicemeetingdescriptionstring max. 2000Text under the question.
statusstringUm de:
draftpublishedPadrão:
publishedworkspaceIdstring (uuid)Defaults to the workspace your new polls go to.
allowMultiplebooleanPadrão:
falseallowOtherbooleanPadrão:
falserequireNamesbooleanPadrão:
falseresultsVisibilitystringUm de:
publicpublic_after_responsepublic_after_closeprivateduplicateCheckstringUm de:
nonesessionipnameemailcodeclosesAtstring (date-time) | nulltimezonestringMeeting polls: the time zone of the slots. Default UTC.
Respostas
The created poll.
idstringThe poll's id, as in https://strawpoll.com/r/{id}.
titlestringdescriptionstringtypestringmultiple_choice: pick one option, or several withallowMultiple.ranking: order the options; each place earns points.ranked_choice: rank the options; an instant runoff finds the majority winner.meeting: mark which dates and times work.
Um de:
multiple_choicerankingranked_choicemeetingstatusstringdeletedandblockedare set by moderation; such forms cannot be changed.Um de:
draftpublishedarchiveddeletedblockedisOpenbooleanvoteCountintegerHow many people voted.
optionsarray of PollOptionotherAnswersarray of objectAnswers voters added themselves, when
allowOtheris on.winnerstring | nullRanked choice only.
tiedarray of stringRanked choice only; the options tied for the win.
roundsintegerRanked choice only.
settingsPollSettingsurlsPollUrlscreatedAtstring (date-time)updatedAtstring (date-time) | null
Experimente
Enviada do seu navegador direto para a API, para nenhum outro lugar. Com “Lembrar”, fica até você fechar esta aba. Uma chave somente leitura permite explorar sem alterar nada.
https://new.strawpoll.com/api/v4/pollsCole uma chave de API para enviar as requisições que precisam de uma.
Requisições com chave contam para as requisições de API diárias do seu plano.