> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Saved Form

> Update a saved form's name, audience, copy, theme, or content blocks

Update an existing saved form. Every field is optional - send only what should
change. Use this to retarget the audience, edit copy, restyle the form to
match your brand, or replace the content blocks (for example to remove blocks
you no longer want rendered publicly).

## Request

<ParamField path="formId" type="string" required>
  Saved form ID.
</ParamField>

<ParamField body="name" type="string">
  New internal form name.
</ParamField>

<ParamField body="listIds" type="string[]">
  Replacement list targeting. Every submission joins these lists.
</ParamField>

<ParamField body="tagIds" type="string[]">
  Replacement tag IDs. Pass an empty array to clear tags.
</ParamField>

<ParamField body="duplicateStrategy" type="string">
  `skip`, `merge`, or `overwrite`.
</ParamField>

<ParamField body="headline" type="string">
  New text for the form's first heading block. Fails if the form has no heading
  block - edit `blocks` instead.
</ParamField>

<ParamField body="description" type="string">
  New text for the form's first paragraph block. Fails if the form has no
  paragraph block - edit `blocks` instead.
</ParamField>

<ParamField body="buttonText" type="string">
  New submit button label.
</ParamField>

<ParamField body="successMessage" type="string">
  New confirmation message on the success screen.
</ParamField>

<ParamField body="redirectUrl" type="string">
  HTTP or HTTPS success redirect. Pass an empty string to switch back to the
  confirmation message.
</ParamField>

<ParamField body="theme" type="object">
  Visual overrides merged into the current theme. Any subset of `accentColor`,
  `backgroundColor`, `textColor`, `mutedTextColor`, `cardColor`, `borderColor`
  (all `#rrggbb`), `borderRadius` (0-32), `headingFontFamily`, `bodyFontFamily`,
  and `density` (`compact` | `balanced` | `spacious`).
</ParamField>

<ParamField body="blocks" type="object[]">
  Full replacement for the form's content blocks. Read the current blocks with
  `GET /api/v1/forms`, modify them, and send the complete array. The form must
  keep exactly one email field and one submit button.
</ParamField>

```bash theme={null}
curl -X PATCH "https://api.sequenzy.com/api/v1/forms/form_123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "buttonText": "Get the planner",
    "theme": { "accentColor": "#0f766e" }
  }'
```

## Responses

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "form": {
      "id": "form_123",
      "name": "Blog newsletter",
      "status": "published",
      "actionUrl": "https://api.sequenzy.com/api/v1/forms/form_123"
    },
    "embed": {
      "actionUrl": "https://api.sequenzy.com/api/v1/forms/form_123",
      "scriptUrl": "https://api.sequenzy.com/api/v1/forms/form_123/embed.js"
    },
    "message": "Form updated."
  }
  ```

  ```json 400 theme={null}
  { "error": "Forms must contain exactly one email field." }
  ```

  ```json 401 theme={null}
  {
    "error": "Missing API key. Provide via x-api-key header or Authorization: Bearer <key>"
  }
  ```

  ```json 403 theme={null}
  { "error": "API key is missing required scope: widgets:write" }
  ```

  ```json 404 theme={null}
  { "error": "Form not found" }
  ```

  ```json 500 theme={null}
  { "error": "Failed to update form." }
  ```
</ResponseExample>
