Create survey question (Admin)
/manage/events/:eventId/questionsCreate a registration survey question. Requires the questionsWrite permission.
| Auth | Login required |
|---|
Path parameters
eventIdstringrequiredEvent ID or slug.
Request body
refIdstringoptionalReference ID for the question (identifier from a template)
typestringrequiredQuestion type (required on create); one of text / longText / email / url / singleSelect / multiSelect / toggle / radioButton / date / image.
titlestringrequiredQuestion text (required); up to 255 characters.
descriptionstringoptionalDescription; up to 500 characters.
Localized question text / help.
Options for singleSelect / multiSelect / radioButton questions; each option requires a title.
requiredbooleanoptionalWhether an answer is required.
ticketIdsstring[]optionalTicket IDs this question applies to; an empty array means all tickets.
ordernumberoptionalDisplay order; an integer. Defaults to 9999.
statusstringoptionalOne of DRAFT / PUBLISHED / PRIVATE.
searchablebooleanoptionalWhether the answer is searchable.
showOnDashboardbooleanoptionalWhether to aggregate on the dashboard.
branchParentId / conditionOptionIds / positionstring | string[] | numberoptionalConditional branching settings.
Type-specific settings.
Response
Returns Question.
curl https://api.4s.link/manage/events/EVENT_ID/questions \-X POST \-H "Authorization: Bearer 4s_at_..." \-H "Content-Type: application/json" \-d '{"type": "text","title": "参加目的を教えてください","required": true,"status": "PUBLISHED"}'
{"id": "q1a2b3c4-...","refId": "purpose","type": "text","title": "参加目的を教えてください","description": null,"required": true,"options": [],"ticketIds": [],"order": 0,"status": "PUBLISHED","searchable": false,"showOnDashboard": false}