create_form
Create a quiz form with questions, scoring rules, and report configuration in a single call — supports knowledge, scored, and outcome-based scenes.
Instructions
Create a form in the team this token is bound to. Pass the questions array and report configuration in one call instead of following up with per-question calls. In the outcome_quiz scene report.outcomes is REQUIRED at create time (TrueFalse votes via trueOutcomes/falseOutcomes). The returned structuredContent.fields carries each question code — read those first, then fill in a scored_quiz report.formula (e.g. q_a + q_b) or a report.dimensionAnalysis via update_form / set_dimension_analysis. Creates the primary language only; add other languages with create_form_translation. Not idempotent: if the call times out it may still have succeeded, so retrying blindly can create a duplicate — check first, then retry only if it is really missing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene | Yes | quiz=exam, scored_quiz=scored_quiz, outcome=typing quiz (votes decide which outcome type wins) | |
| theme | No | Optional visual theme matching the quiz topic/mood. Default light. Pick the one that best fits the quiz: light (clean neutral bright; default — formal/general quizzes); corporate (professional blue+gray; B2B, career, business assessments); dark (modern sleek dark; tech, night, cool personality quizzes); cupcake (soft pink cute rounded; fun, food, kids, lighthearted); pastel (gentle pastel artsy; lifestyle, aesthetics, soft mood); valentine (pink romantic hearts; love, relationships, holidays); synthwave (neon purple/pink retro; gaming, trends, bold personality); luxury (dark + gold premium; finance, luxury brands, high-end); forest (deep green nature; environment, health, outdoors); coffee (warm brown cozy; food & drink, cafe, lifestyle); autumn (warm orange/brown seasonal; autumn, cozy, harvest); halloween (purple+orange spooky; Halloween, horror, festive fun); night (deep calm blue; astronomy, mindfulness, calm tech); cyberpunk (high-contrast neon yellow; tech, esports, gaming). | light |
| title | Yes | Form title (1-200 characters) | |
| report | No | Report configuration. knowledge_quiz / scored_quiz: overallAnalysis fields are flat at the top level and dimensionAnalysis is nested (strongly recommended for the scored_quiz scene, optional for the knowledge_quiz scene). outcome: only the outcomes key is allowed, and it is required at create time. | |
| language | No | Default zh_CN | zh_CN |
| openGraph | No | Social share card (Open Graph) settings: the title / description / image shown when the answer link is shared to social media or chat apps. In update_form each sub-key is merged independently (only the keys you pass change; pass an empty string to clear one). SEO keywords are generated automatically and cannot be set here. | |
| questions | No | Optional. A list of questions/page breaks to create at once, written into form.fields in order. Question types: SingleCheck/MultiCheck/TrueFalse; FillBlank (free text — scored in quiz via correctAnswer, an unscored data-collection field in scored_quiz); DropDown (single or multiple via `multiple`, use it instead of SingleCheck/MultiCheck when there are more than 20 choices); Cascade (hierarchical choices via children, scored_quiz only); Ordering (quiz only, correctAnswer = all choices in the correct order); DateField/TimeField as unscored data-collection fields (scored_quiz only); NumberField (quiz: optional numeric correctAnswer + score; scored_quiz: the submitted number feeds report formulas); Rate (scored_quiz only, the 1..steps rating value is the question score unless per-star scores are set in the web app). Insert a page break with { type: "Breaker" }, which the AI can interleave between questions to paginate. At most 100 items. | |
| systemText | No | Optional. Answer-page system text overrides as a key→text map; empty values are dropped and fall back to the language default. | |
| description | No | Optional form description. Allows description-scope rich text (including <img src>). This field also accepts an inline image: put an <img src="..."> in it, where src is a direct image URL that renders in <img src> (a page URL that merely contains an image does not work). Use finalize_image_upload to host an image yourself, or a direct URL the user supplied. Never invent an image URL — omit the image instead of risking a broken one. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | The new form id | |
| url | No | Admin edit URL | |
| scene | No | knowledge_quiz / scored_quiz / outcome_quiz | |
| theme | No | Answer-page theme name | |
| title | No | Form title | |
| fields | No | Every question code — read these before writing a formula or dimensions | |
| language | No | Primary language of the form | |
| outcomes | No | Outcome types (outcome_quiz scene only) | |
| shareUrl | No | Public share / answer link | |
| hasReport | No | Whether a report configuration was passed | |
| publicToken | No | Token behind the public answer link | |
| questionCount | No | How many questions / page breaks were created |