Skip to main content
A form contains metadata plus a definition object:

Definition sections

For updates, omitted blocks, settings, and theme sections remain unchanged. This makes it possible to update a form name or theme without resending its blocks. Variables and hidden fields are declared during creation in this API version.

Create a complete definition

Create a complete form by passing a definition to POST /v1/forms:
type is required. MULTI and SINGLE are available now. CONVERSATIONAL is reserved and returns 422 UNSUPPORTED_FORM_TYPE until that renderer is released. Do not send the old single_page field or write definition.settings.singlePage; the top-level type is authoritative.

Variables and hidden fields

Variable values can be strings or finite numbers. Names must start with a letter or underscore and may then contain letters, numbers, _, -, or .. A form can declare up to 100 variables. Onlyform always supplies score and price with a default value of 0 when you omit them. Hidden fields use the same naming rules. A form can declare up to 100 unique hidden fields. Pass values in the public form URL with matching query-parameter names, for example:
The declarations are stored as form logic metadata. You do not need to add hidden-field question blocks for them.
variables and hidden_fields are create-only in the 2026-08-01 API contract. A later update containing either field returns 422 INVALID_DEFINITION_FIELD.

Block shape

Every block requires a stable id and supported type.
Block IDs are caller-supplied strings. Keep them stable across updates because submissions refer to fields by ID. Blocks may also contain:
  • choices for choice-based questions.
  • children for nested groups.
  • part_of for related display blocks.
  • row_id for blocks placed in the same row.
  • properties for type-specific settings.
The OpenAPI schema lists every supported block type.

Manage blocks directly

Use the focused block endpoints when you do not want to replace the rest of the form definition: Add a question at position 1:
To reorder several blocks atomically, fetch the latest collection and ETag, reorder the complete items array, then send it as blocks to PUT /v1/forms/{formId}/blocks with If-Match.
Focused block endpoints address top-level blocks. Nested questions are stored in a group block’s children array; replace that parent group to edit its nested collection.

Update a theme without changing content

Because blocks and settings are omitted, the request does not replace them.

Prevent lost updates with ETags

GET /v1/forms/{formId} returns an ETag header. Send that value as If-Match when updating the form:
If another request changed the form after you fetched it, Onlyform returns 412 FORM_VERSION_MISMATCH. Fetch the latest form, reconcile your change, and retry with the new ETag.
If you send definition.blocks, you replace the ordered block collection. Always start from the latest form and preserve every block you intend to keep.

Plan restrictions

API writes enforce the same plan limits as the dashboard. Features such as custom CSS, redirects, branding removal, payment fields, file uploads, signatures, gates, and maximum question counts may require a paid plan. A restricted change returns 403 PLAN_RESTRICTION.

Deletion behavior

DELETE /v1/forms/{formId} moves the form to trash and returns 204 No Content. It does not permanently remove the form.

Create a form

Create blocks, settings, a theme, variables, and hidden fields in one request.

Add a block

Add a question or content block without replacing the form.