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

# Create Saved Form

> Create a list-scoped public signup form

Create and publish a saved form. The returned opaque `formId` is a client-safe
public capability; the selected lists, tags, duplicate behavior, and success
action remain server-side.

## Request

<ParamField body="name" type="string" required>
  Internal form name.
</ParamField>

<ParamField body="listIds" type="string[]" required>
  One or more list IDs that every submission joins.
</ParamField>

<ParamField body="tagIds" type="string[]">
  Existing tag IDs to apply.
</ParamField>

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

<ParamField body="successMessage" type="string">
  Confirmation shown when `redirectUrl` is omitted.
</ParamField>

<ParamField body="redirectUrl" type="string">
  Optional HTTP or HTTPS success redirect.
</ParamField>

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/v1/forms" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Blog newsletter",
    "listIds": ["list_123"],
    "tagIds": ["tag_123"],
    "successMessage": "You are subscribed."
  }'
```

## 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"
    }
  }
  ```

  ```json 400 theme={null}
  { "error": "Every listId must belong to the selected company." }
  ```

  ```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 500 theme={null}
  { "error": "Failed to create form." }
  ```
</ResponseExample>
