Create form
create_formUse to add a form under an existing project_id. Idempotent on slug unless strict is true. Overrides are nullable; omit them to inherit project notify emails, webhook, redirect, require_turnstile, and email templates. Pass email.subject / email.intro to override notification copy for this form only. Pass webhook_url_override to send this form to a different URL. Field contract labels (label) are used on notification emails. Checkbox groups, select multiple, and other multi-value HTML fields must use a [] suffix on the name (name="services[]") or only the last checked value is stored. Put services[] on field_contract.name too. JSON/fetch should send a real array without brackets ({ "services": ["a", "b"] }) and must not use Object.fromEntries(formData) — use formData.getAll("services"). Single checkbox, select, or combobox: no brackets. File inputs use multipart POST (name="resume[]" for multiple). Enable uploads on the project first. Downloads are the project inbox at files_url, with the form slug as a folder — never put that URL in a public snippet.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Form display name, e.g. Contact or Quote request. | |
| slug | Yes | Lowercase hyphenated identifier, unique per project. Used for idempotent re-runs. | |
| No | Per-form subject and intro overrides for the notification email. | ||
| strict | No | When true, fail if the slug already exists instead of returning the existing record. | |
| project_id | Yes | Project (website) id from list_projects, create_project, or bootstrap_site. | |
| field_contract | No | Declared fields (name, type, label, report). Drives get_snippet and the email layout. Null clears it. | |
| webhook_url_override | No | Webhook endpoint for this form only. Null inherits the project webhook. | |
| redirect_url_override | No | Success redirect for this form only. Null inherits default_redirect_url. | |
| notify_emails_override | No | Recipients for this form only. Null inherits the project's notify_emails. | |
| webhook_secret_override | No | HMAC secret for this form's webhook. Null inherits the project secret. | |
| require_turnstile_override | No | Force Turnstile on or off for this form. Null inherits the project setting. |