> ## 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 Campaign Variation

> Save a version of a campaign email as a variation

Saves content as a new `ready` variation, for example a copy of a version you want to take in another direction. Provide `blocks` or `html`, not both. Blocks without a footer get the company's default footer, as with [Update Campaign](/api-reference/campaigns/update). The campaign email does not change.

## Request

<ParamField path="campaignId" type="string" required>
  Campaign ID. Email campaigns only.
</ParamField>

<ParamField body="name" type="string" required>
  Name shown on the canvas. 1 to 120 characters.
</ParamField>

<ParamField body="blocks" type="array">
  [Email blocks](/api-reference/campaigns/update), validated like campaign
  content. Required unless you send `html`.
</ParamField>

<ParamField body="html" type="string">
  HTML converted to blocks. Use instead of `blocks`.
</ParamField>

<ParamField body="summary" type="string | null">
  What this version changes, up to 500 characters.
</ParamField>

<ParamField body="subject" type="string | null">
  The subject this variation uses. Omit or send `null` to keep the email's
  subject when it is used.
</ParamField>

<ParamField body="previewText" type="string | null">
  The preview text this variation uses. Omit or send `null` to keep the email's.
</ParamField>

<ParamField body="parentVariationId" type="string | null">
  The variation this one is derived from. It is labeled as a branch of it
  (`V2.1`, `V2.2`, ...). Omit for a version of the email (`V1`, `V2`, ...).
</ParamField>

<ParamField body="emailTheme" type="object | null">
  The variation's own email theme (`presetId`, `colors`, `typography`,
  `layout`). A partial theme is completed with defaults. `null` uses the
  email's theme. Using the variation puts its theme on the email.
</ParamField>

<ParamField body="fontFamily" type="string | null">
  The variation's own body font stack, up to 500 characters. `null` uses the
  email's font.
</ParamField>

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/v1/campaigns/camp_abc123/variations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Shorter intro",
    "blocks": [
      { "id": "h1", "type": "heading", "content": "A quick note about pricing", "level": 1 }
    ]
  }'
```

## Response

<ResponseField name="variation" type="object">
  The new variation. See [List
  Variations](/api-reference/campaigns/variations-list#the-variation-object).
</ResponseField>

<ResponseField name="warnings" type="string[]">
  Block fields that were accepted but had no effect. Omitted when there are
  none.
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "variation": {
      "id": "var_9xk2",
      "emailId": "email_abc123",
      "parentId": null,
      "label": "V2",
      "name": "Warm and personal",
      "summary": "Rewrote the opening in a friendlier voice and shortened the body.",
      "prompt": "Three warmer, shorter versions",
      "style": "fresh",
      "status": "ready",
      "error": null,
      "subject": "A quick note about our pricing",
      "previewText": null,
      "blocks": [
        { "id": "h1", "type": "heading", "content": "A quick note about pricing", "level": 1 }
      ],
      "emailTheme": null,
      "fontFamily": null,
      "position": null,
      "inUse": false,
      "usedAt": null,
      "createdAt": "2026-10-14T09:12:00.000Z",
      "updatedAt": "2026-10-14T09:12:41.000Z"
    }
  }
  ```

  ```json 400 theme={null}
  {
    "error": "Provide the variation's blocks or html."
  }
  ```

  ```json 401 theme={null}
  {
    "error": "Invalid API key"
  }
  ```

  ```json 404 theme={null}
  {
    "error": "Variation not found"
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.