v101

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-08235133843.7 KB
Widgets

Update saved form

Update a saved form's name, audience targeting, copy, visual theme, or content blocks. Every field is optional - send only what should change.

The headline, description, buttonText, and successMessage fields edit the matching content block and fail with 400 when the form has no such block; replace blocks for structural changes. The blocks array fully replaces the form's content blocks and must keep exactly one required email field and one submit button. An empty redirectUrl switches the form back to its confirmation message.

Blocks render in array order and each needs a unique id and a kind. Input blocks use kind: "form-field" with fieldType (text, email, phone, number, textarea, select, radio, checkbox, consent, hidden), name (the custom attribute key), label, placeholder, required, defaultValue, showLabel, width (full or half), mapsTo (email, firstName, lastName, phone, customAttribute; defaults to customAttribute), and options for choice fields ([{ value, label, id }], where label and id default to value). A hidden field with a defaultValue stores that server-owned value and ignores submitted values; a hidden field without one stores the value the page submits. Validation errors name the offending property, for example blocks[3].options[0].value.

patch/forms/{companyIdOrFormId}

Path parameters

companyIdOrFormIdstring required

The saved form ID to update

Request body

namestring
listIdsstring[]
tagIdsstring[]

Replacement tag IDs. An empty array clears tags.

duplicateStrategy'skip' | 'merge' | 'overwrite'
headlinestring
descriptionstring
buttonTextstring
successMessagestring
redirectUrlstring

HTTP or HTTPS success redirect. An empty string switches back to the confirmation message.

themeobject

Visual theme overrides merged into the current theme (accentColor, backgroundColor, textColor, mutedTextColor, cardColor, borderColor as "#rrggbb", borderRadius 0-32, headingFontFamily, bodyFontFamily, density).

blocksobject[]

Full replacement for the form's content blocks.

Response

Form updated

successboolean
formobject
embedobject

Embed recipes, present when the form is published.

messagestring

Example response

{
  "success": true
}