매개변수
경로
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.기본값:
true
응답
The saved response's id, and what the voter may now see. participants lists the visible responses' meeting answers, only on forms with meeting questions whose results the voter may see.
idstring (uuid)participantsarray of ParticipantpartialbooleanWhether
participantsholds only the responses sinceparticipantsSince.wordCloudsobjectWord clouds the voter sees right after answering, by field id.
quizobject | nullThe quiz score, on quizzes; null otherwise.
respondAgainobjectWhether and when this voter may respond again.
직접 해 보기
브라우저에서 API로만 직접 전송됩니다. ‘기억하기’를 켜면 이 탭을 닫을 때까지 유지됩니다. 읽기 전용 키를 쓰면 아무것도 바꾸지 않고 둘러볼 수 있습니다.
https://new.strawpoll.com/api/v4/forms/{slug}/submit키를 사용한 요청은 요금제의 일일 API 요청 수에 포함됩니다. 키로 보내는 응답에는 code에 투표의 고유 코드 중 하나가 필요합니다.