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

> Rename a variation, replace its content or move it on the canvas

Renames a variation or replaces its content. Send at least one field; fields you omit stay as they are. Replacement blocks without a footer get the company's default footer. Content (`blocks`, `html`, `subject`, `previewText`, `emailTheme`, `fontFamily`) can only change once the variation is `ready`. To change it with AI instead, use [Edit variation with AI](/api-reference/campaigns/variations-edit). Updating a variation never changes the campaign email; [use it](/api-reference/campaigns/variations-use) for that.

## Request

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

<ParamField path="variationId" type="string" required>
  Variation ID.
</ParamField>

<ParamField body="name" type="string">
  New name, 1 to 120 characters.
</ParamField>

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

<ParamField body="blocks" type="array">
  Replacement [email blocks](/api-reference/campaigns/update). Send `blocks` or
  `html`, not both.
</ParamField>

<ParamField body="html" type="string">
  Replacement HTML, converted to blocks.
</ParamField>

<ParamField body="subject" type="string | null">
  The subject this variation uses. `null` keeps the email's subject.
</ParamField>

<ParamField body="previewText" type="string | null">
  The preview text this variation uses. `null` keeps the email's.
</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>

<ParamField body="position" type="object | null">
  Where the variation sits on the editor canvas, as `{ "x": number, "y": number }`
  in canvas pixels (each within ±1,000,000). `null` lets the canvas place it
  automatically. Moving a variation does not change its `updatedAt`.
</ParamField>

```bash theme={null}
curl -X PATCH "https://api.sequenzy.com/api/v1/campaigns/camp_abc123/variations/var_9xk2" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Warm, shorter" }'
```

## Response

<ResponseField name="variation" type="object">
  The updated variation.
</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 at least one of name, summary, blocks, html, subject, or previewText."
  }
  ```

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

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

  ```json 409 theme={null}
  {
    "error": "This variation is still generating or failed, so its content can't be edited"
  }
  ```
</ResponseExample>


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