---
title: "Update saved form"
method: PATCH
path: "/forms/{companyIdOrFormId}"
tags: ["Widgets"]
---

# Update saved form

`PATCH /forms/{companyIdOrFormId}`

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`.

## Path parameters

- `companyIdOrFormId` string, required

## Request body

- object
  - `name` string
  - `listIds` string[]
  - `tagIds` string[] — Replacement tag IDs. An empty array clears tags.
  - `duplicateStrategy` 'skip' | 'merge' | 'overwrite'
  - `headline` string
  - `description` string
  - `buttonText` string
  - `successMessage` string
  - `redirectUrl` string — HTTP or HTTPS success redirect. An empty string switches back to the confirmation message.
  - `theme` object — Visual theme overrides merged into the current theme (accentColor, backgroundColor, textColor, mutedTextColor, cardColor, borderColor as "#rrggbb", borderRadius 0-32, headingFontFamily, bodyFontFamily, density).
  - `blocks` object[] — Full replacement for the form's content blocks.

## Response `200`

Form updated

- object
  - `success` boolean
  - `form` object
  - `embed` object — Embed recipes, present when the form is published.
  - `message` string

## Other responses

- `400` — Invalid audience, theme, copy target, or content blocks
- `401` — Unauthorized
- `403` — API key is missing widgets:write
- `404` — Form not found
- `500` — Failed to update form

---

[API](https://skmtc.net/sequenzy/apis/sequenzy-api.md) · [All operations](https://skmtc.net/sequenzy/apis/sequenzy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sequenzy/sequenzy-api/versions/af1cf9620482/schema)
