Generate form
POST api.weavely.ai/v1/forms/generate
Request
No authentication header is required for this endpoint.Body
A friendly name for the form (optional).
A natural-language description of the form to generate
e.g.
e.g.
"A simple contact form in Flemish".Optional array of the following objects:
Response
The URL that opens the generated form in the Weavely editor.
Get form fields
GET api.weavely.ai/v1/forms/[formId]/fields
Request
Headers
Bearer <token>Your personal token.
Path Parameters
The unique identifier of the form.
Response
The form’s unique identifier.
The timestamp of the published version, or
null if the form has no published version.The list of fields in the form.
The field’s unique identifier.
The field’s display label.
The type of the field (e.g.,
text, datetime, etc.).Create form
POST api.weavely.ai/v1/formsCreates a new form from a complete form specification.
Request
Headers
Bearer <token>Your personal token.
application/jsonBody
The request body is a complete form specification with the following structure:Display name for the form shown in the Weavely dashboard.
The UUID of the team to associate this form with.
Set to
true to publish the form immediately. Without this, the form is created as a draft and won’t be accessible at its public URL.The form structure containing all pages and elements.See Form Structure Reference below for complete element types and configurations.
The form’s visual theme configuration.See Theme Configuration Reference below for all available options.
Optional form settings.See Quiz Mode Reference below for quiz-specific settings. See Internationalisation Reference for supported language codes.
Optional conditional logic rules.Each rule defines conditions and actions to execute based on field values.See Logic Rules Reference below for complete documentation.
Optional event-based triggers.Triggers execute actions in response to form events (e.g., form submission, page load).See Event Triggers Reference below for available triggers and actions.
Optional calculated field values.(Currently undocumented - reserved for future use)
Optional page-specific attributes.(Currently undocumented - reserved for future use)
Response
The unique identifier (UUID) of the created form.
Direct link to edit the form in the Weavely editor.Format:
https://forms.weavely.ai/editor/{formId}Example
Request:Form Structure Reference
Element Types
Weavely forms support 26 element types organized into categories: Input Elements:input-text- Single-line text inputinput-number- Numeric inputinput-email- Email address input with validationinput-phone-number- Phone number inputinput-url- URL input with validationinput-time- Time pickerinput-date- Date pickertext-area- Multi-line text inputinput-file- File upload
checkbox-buttons- Multiple selection checkboxesradio-buttons- Single selection radio buttonsdropdown- Dropdown select menuimage-choice- Image-based selectioncheckbox- Single checkbox (yes/no)matrix- Grid of choices (rows × columns)ranking- Drag-and-drop ranking
star-rating- Star-based rating (customizable number of stars)scale-rating- Numeric scale ratingrange-slider- Slider with min/max values
heading- Heading textparagraph- Paragraph textimage- Image displayembed-html- Custom HTML embedembed-audio- Audio playerembed-video- Video embed
signature- Digital signature capture
Element Specifications
input-text
input-text
Single-line text input
input-number
input-number
Numeric input only
input-email
input-email
Email input with validation
input-phone-number
input-phone-number
Phone number input
input-url
input-url
URL input with validation
input-time
input-time
Time picker input
input-date
input-date
Date picker input
text-area
text-area
Multi-line text input
input-file
input-file
File upload input
checkbox-buttons
checkbox-buttons
radio-buttons
radio-buttons
dropdown
dropdown
Dropdown select menu
image-choice
image-choice
Image-based selection
checkbox
checkbox
Single checkbox (yes/no)
matrix
matrix
Grid of choices (rows × columns)
ranking
ranking
Drag-and-drop ranking
star-rating
star-rating
Star-based rating
scale-rating
scale-rating
Numeric scale rating
range-slider
range-slider
Slider with min/max values
heading
heading
Heading text
paragraph
paragraph
Paragraph text. Supports HTML markup and variable piping via
{{variable_id}} syntax.image
image
Image display
embed-html
embed-html
Custom HTML embed
embed-audio
embed-audio
Audio player
embed-video
embed-video
Video embed
signature
signature
Digital signature capture
Theme Configuration Reference
ThethemeJSON object controls all visual styling for the form. It contains the following sections: name, font, logo, colors, layout, visual, and components.
Theme Presets
Weavely includes 7 preset themes. Set via thename field — the preset provides default values for colors, fonts, and components. Any explicit values you set will override the preset defaults.
NovaRetroDawnDuskFrostEmberGlass
Font
Controls typography for body text and headings independently.Logo
Optional logo image displayed on the form.src to an image URL, or null for no logo.
Colors
Full color palette for the form. All values are hex codes.| Color | Controls |
|---|---|
primary | Buttons, accents, active states |
background | Page/form background |
text | General body text |
question | Field labels / question text |
answer | User input text |
secondary | Secondary UI elements |
surface | Input field backgrounds |
border | Input borders, dividers |
error | Validation error messages |
primary and background) and the theme preset will fill in the rest.
Layout
Controls where the visual (image or color) appears relative to the form.| Type | Description |
|---|---|
under | Visual is placed behind the form as a full-page background |
left | Visual is displayed as a left side panel, form on the right |
right | Visual is displayed as a right side panel, form on the left |
clean | No visual — form only |
over | Visual overlays the form area |
through | Visual bleeds through the form |
Visual
The background visual — either an image or a solid color. Works together withlayout to determine how the visual is positioned.
Image visual:
variables object uses CSS-like properties and defaults to size: "cover", repeat: "no-repeat", position: "center" for both types.
Common combinations:
- Side image:
layout.type: "right"(or"left") +visual.type: "image"— displays a photo alongside the form - Background color:
layout.type: "under"+visual.type: "color"— fills the page behind the form with a solid color - Background image:
layout.type: "under"+visual.type: "image"— fills the page behind the form with an image - No visual:
layout.type: "clean"— form only, no visual element
Components
Controls form layout, input style, button style, and question weight.default— Rounded input stylingsquare— Square input styling
default— Rounded button stylingsquare— Square button styling
default— Default hover animationgrow— Grow effect on hover
Complete themeJSON Example
Quiz Mode Reference
Quiz mode turns a form into a scored assessment.Enabling Quiz Mode
Setsettings.mode to "quiz" and optionally configure quiz-specific settings:
| Setting | Type | Description |
|---|---|---|
mode | "quiz" | Activates quiz mode. Omit for standard form behaviour |
quiz.instantFeedback | boolean | When true, shows correct/incorrect feedback after each question rather than at the end |
Quiz-Compatible Element Types
Only the following element types support quiz scoring:radio-buttonscheckbox-buttonsinput-textdropdown
The quiz Property
Add a quiz object to any compatible element to define its correct answer and score:
| Field | Type | Description |
|---|---|---|
score | number | Points awarded for a correct answer. Can be any positive number — questions can be weighted differently |
answer | string | Correct answer for single-select elements (radio-buttons, input-text, dropdown). For radio-buttons and dropdown, must match the option’s value exactly. For input-text, matching is case-insensitive |
answer | array of strings | All correct answers for checkbox-buttons — respondent must select exactly this set of values |
Quiz Variables
When quiz mode is active, four variables are automatically available for use in logic rules and answer piping:| Variable ID | Description |
|---|---|
quiz:quiz-score | Total points scored by the respondent |
quiz:max-score | Maximum possible score (sum of all quiz.score values) |
quiz:correct-answers | Number of questions answered correctly |
quiz:total-quiz-questions | Total number of quiz questions in the form |
Score-Based Conditional Endings
Use quiz variables in logic rules to direct respondents to different ending pages based on their score:hideElement, showElement, hidePage, skipToPage, setEnding).
Showing Results to Respondents
Pipe quiz variables into paragraph labels using{{variable_id}} syntax. Element labels support HTML markup:
Logic Rules Reference
Logic rules enable conditional behavior based on field values.Structure
Logical Operators
any- OR logic: trigger actions if ANY condition is trueall- AND logic: trigger actions if ALL conditions are true
Condition Operators
Universal (all field types):isEmpty- Check if field is empty/nullisNotEmpty- Check if field has a valueisEqual- Check if field equals a specific valueisNotEqual- Check if field does not equal a specific value
contains- Check if field contains a substringdoesNotContain- Check if field does not contain a substringstartsWith- Check if field starts with a stringendsWith- Check if field ends with a string
lessThan- Check if field is less than a valuelessThanOrEqual- Check if field is less than or equal to a valuegreaterThan- Check if field is greater than a valuegreaterThanOrEqual- Check if field is greater than or equal to a value
Available Actions
hideElement- Hide a specific elementshowElement- Show a specific elementhidePage- Hide a specific pageskipToPage- Navigate to a specific pagesetEnding- Set which ending page to display
Event Triggers Reference
Event triggers execute actions in response to form events.Structure
Available Triggers
formSubmitted- Triggered when form is successfully submittedformLoaded- Triggered when form initially loadsformPageShown- Triggered when a form page is displayed
Available Actions
openUrl- Redirect to a URL- Requires
data.urlfield
- Requires
restartForm- Restart the form from the beginning- No additional data required
Internationalisation Reference
Set the form’s language viasettings.i18n.language. The server automatically injects the correct system message translations (button labels, placeholders, error messages) for the chosen language.
Supported Languages
| Language | Code |
|---|---|
| Arabic | ar |
| Catalan | ca |
| Chinese (Simplified) | zh-Hans |
| Chinese (Traditional) | zh-Hant |
| Croatian | hr |
| Czech | cs |
| Danish | da |
| Dutch | nl |
| English | en |
| Estonian | et |
| Finnish | fi |
| French | fr |
| German (Formal) | de |
| German (Informal) | di |
| Greek | el |
| Hebrew | he |
| Hindi | hi |
| Hungarian | hu |
| Indonesian | id |
| Italian | it |
| Japanese | ja |
| Korean | ko |
| Norwegian | no |
| Polish | pl |
| Portuguese | pt |
| Russian | ru |
| Spanish | es |
| Swedish | sv |
| Turkish | tr |
| Ukrainian | uk |
| Vietnamese | vi |
de for formal (“Sie”) and di for informal (“du”).