パラメーター
パス
slugstring 必須 max. 20The form's public id, as in
https://strawpoll.com/r/{slug}.
リクエストボディ application/json
fieldsobject 必須Answers keyed by field id:
- choice and picture questions: list of choice ids, plus at most one free-text string when write-ins are allowed;
- ranking: every choice id, best first;
- meeting: per date field, a list of
{ "choiceId", "status" }with statusyes,if_need_beorno; yes_no:"yes"or"no";ratingandscale: the number as a string;- text, email and contact fields: a string.
namestring max. 255The respondent's name, used when the form has no contact name question. Needed with
responseDuplicateCheckname.emailstring (email)Ignored. The email comes from the form's email question, a verified address (see /verify) or the invite.
commentstringIgnored. Comments go to the form's discussion now, apart from the response.
codestringUnique code or invite code.
captchaTokenstringvoteTokenstringRequired without an API key: the token the voting page got, or one from
GET /forms/{slug}/vote-token. Each takes one response.automatedbooleanThe browser reports automation (
navigator.webdriver); such a vote needs the captcha.hiddenobjectValues of the form's hidden fields by name, such as
utm_source; at most 500 characters each.timeUpbooleanTimed quizzes; sent when the time ran out, so unanswered questions score nothing.
secretbooleanSend true when you told the respondent their response is secret. It is then only saved while the form is a secret ballot (
responsesVisibility: secret), and refused withnot_secretotherwise.additionalbooleanMeeting polls; add another person's vote from the same browser.
participantsbooleanSend
falseto leaveparticipantsand word clouds out of the reply, which is faster on big forms.デフォルト:
trueidstring (uuid) 必須
レスポンス
The changed response's id, and the responses the voter may now see.
idstring (uuid)participantsarray of ParticipantpartialbooleanwordCloudsobjectquizobject | null
試してみる
ブラウザからAPIへ直接送られ、ほかには送られません。「記憶する」をオンにすると、このタブを閉じるまで保持されます。 読み取り専用キーなら、何も変更せずに試せます。
https://new.strawpoll.com/api/v4/forms/{slug}/submitキーを使ったリクエストは、プランの1日あたりのAPIリクエスト数に含まれます。