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

# Generate Sequence Email Variations

> Design alternative versions of one email of a sequence with AI

Starts designing 1 to 4 variations of one email of a sequence with AI, like asking "I like email 1, make a few variations" in the sequence editor's Emails view. It returns them at once with `status: "generating"`. Each one takes its own direction, planned from your prompt. `style` sets how far they move: `close` versions are edits of the email; `fresh` versions are written anew with their own structure in your brand's colors and fonts; `bold` versions also get their own look. The email does not change until you [use one](./email-variations-use).

The source is the email as saved. Generation runs in the background and usually takes under a minute: poll [List Sequence Email Variations](./email-variations-list) until each one is `ready` or `failed`. Each variation succeeds or fails on its own, and one still generating after 10 minutes is reported as `failed`. Retrying is a new request that creates new variations.

An email that is a single raw HTML block can't be varied; change it with [Edit Sequence Emails with AI](./edit-emails) instead. A/B test steps, steps without an email and steps that send the same email as an earlier step can't have variations.

## Request

<ParamField path="sequenceId" type="string" required>
  Sequence ID.
</ParamField>

<ParamField path="emailId" type="string" required>
  The email's ID: the `emailId` of its step from [Get Sequence](./get).
</ParamField>

<ParamField body="prompt" type="string" required>
  The direction for the new versions, in any language. Up to 2,000 characters.
</ParamField>

<ParamField body="count" type="integer" default="3">
  How many variations to design, from 1 to 4.
</ParamField>

<ParamField body="style" type="string" default="fresh">
  How far the new versions move from the email: `close`, `fresh` or `bold`.
</ParamField>

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/v1/sequences/seq_abc123/emails/email_abc123/variations/generate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "prompt": "A few bolder versions", "count": 3 }'
```

## Response

Returns `202 Accepted`.

<ResponseField name="email" type="object">
  The email the variations are of: `emailId`, `nodeId` (its step) and `label`.
</ResponseField>

<ResponseField name="variations" type="array">
  The new variations, all with `status: "generating"` and `blocks: null`.
</ResponseField>

<ResponseExample>
  ```json 202 theme={null}
  {
    "success": true,
    "email": { "emailId": "email_abc123", "nodeId": "node_abc123", "label": "Email 1" },
    "variations": [
      {
        "id": "evar_9xk2",
        "emailId": "email_abc123",
        "parentId": null,
        "label": "V1",
        "name": "New variation",
        "summary": null,
        "prompt": "A few bolder versions",
        "style": "fresh",
        "status": "generating",
        "error": null,
        "subject": null,
        "previewText": null,
        "blocks": null,
        "emailTheme": null,
        "fontFamily": null,
        "position": null,
        "inUse": false,
        "usedAt": null,
        "createdAt": "2026-10-16T09:12:00.000Z",
        "updatedAt": "2026-10-16T09:12:00.000Z"
      }
    ]
  }
  ```

  ```json 400 theme={null}
  {
    "error": "This email is a single raw HTML block. Design variations need Sequenzy blocks; change it with POST /sequences/{sequenceId}/emails/edit instead."
  }
  ```

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

  ```json 404 theme={null}
  {
    "error": "Email of this sequence not found"
  }
  ```

  ```json 409 theme={null}
  {
    "error": "Up to 8 variations can generate at once. Wait for the ones in progress to finish, then try again."
  }
  ```

  ```json 503 theme={null}
  {
    "error": "Could not start generating variations. Try again."
  }
  ```
</ResponseExample>

A `409` means the email already has variations generating and this request would take it past 8 at once. Wait for some to finish, then send the request again. A `503` means generation could not be started; any variations it created are marked `failed`.


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