create_form
Create a form
Create a new form, survey, questionnaire, or intake form from a title and a complete list of fields. Use when the user wants to make/build/create a form, survey, poll, intake, registration, application, or feedback form. Works without sign-in: returns a draftToken for an anonymous draft that can be edited and previewed immediately. Pass the FULL field list in one call rather than adding fields one by one. Signed in, the form is created in the active workspace (the result names it) — if the user means another brand, switch_workspace first.
The assistant passes the full field list in one call rather than adding fields one by one — describe the whole form up front for best results. You get a draft with a live preview URL; nothing is public until you publish.
| Parameter | Type | Description |
|---|---|---|
| title * | string | Form title respondents see, e.g. 'Project inquiry' |
| description | string | Short intro text shown above the form |
| slug | string | URL slug; derived from the title if omitted |
| language | "en" | "sv" | Respondent-facing UI language (default en) |
| fields * | array of object | Complete ordered field list |
| fields[].key * | string | Stable identifier, lowercase letters/digits/underscores, e.g. 'budget_range' |
| fields[].type * | "short_text" | "long_text" | "email" | "phone" | "number" | "single_choice" | "multi_choice" | "date" | "file_upload" | "signature" | "rating" | "url" | Field type. There is no password/PIN type — forms.ax never collects credentials. |
| fields[].label * | string | What the respondent sees, e.g. 'Describe your project' |
| fields[].description | string | Optional help text shown under the label |
| fields[].required | boolean | |
| fields[].options | array of string | For single_choice/multi_choice: 2+ unique options |
| fields[].min | number | number/rating lower bound (rating default 1) |
| fields[].max | number | number/rating upper bound (rating default 5) |
| fields[].adaptive | object | AI follow-up questions on thin answers (short_text/long_text only) |
| fields[].validation | object | |
| fields[].page | string | Page key this field belongs to (multistep forms). Omit for single-page forms or the first page. |
| pages | array of object | Optional: make the form multistep by defining ordered pages/steps and tagging fields with page keys (fields[].page or pages[].fields). Sets the paged layout automatically. |
| pages[].key | string | Stable page identifier, lowercase letters/digits/underscores, e.g. 'about_you' |
| pages[].title | string | Step heading respondents see, e.g. 'About you' |
| pages[].description | string | Optional intro text under the step heading |
| pages[].fields | array of string | Field keys on this page, in order. Unlisted fields keep their page (or fall to the first page). |
* required