Sequences

Generate sequence email variations

Changed on

Starts designing 1 to 4 variations of one email of a sequence with AI, like "I like email 1, make a few variations" in the sequence editor's Emails view, and returns them at once with status generating. The source is the email's saved content. Generation runs in the background, usually under a minute; poll List Sequence Email Variations until each is ready or failed. The email does not change until you use one. An email can have up to 8 variations generating at once.

post/sequences/{sequenceId}/emails/{emailId}/variations/generate

Request

  • Base URL
    https://api.sequenzy.com/api/v1
  • URL
    https://api.sequenzy.com/api/v1/sequences/{sequenceId}/emails/{emailId}/variations/generate
  • Auth
    HTTP bearer

Path parameters

sequenceIdstring required

Sequence ID

emailIdstring required

The email's ID, the emailId of its step from Get Sequence

Request body

promptstring required

The direction for the new versions, in any language.

countinteger
style'close' | 'fresh' | 'bold'

How far the new versions move from the email. close edits it, keeping its style and structure; fresh writes each version anew with its own structure in the brand's colors and fonts; bold also gives each its own look. Defaults to fresh.

Example request

{
  "prompt": "A few bolder versions"
}

Response

Generation started

successboolean

Example response

{
  "success": true,
  "email": {
    "label": "Email 1"
  },
  "variations": [
    {
      "label": "V2.1",
      "name": "Warm and personal",
      "blocks": [
        {
          "id": "block_123",
          "type": "html",
          "content": "<h1>Hello</h1>",
          "styles": {
            "backgroundColor": "#f8fafc",
            "backgroundOpacity": 80,
            "textColor": "#111827",
            "borderRadius": 12,
            "borderColor": "#cbd5e1",
            "borderWidth": 1
          },
          "conditions": [
            {
              "id": "c1",
              "value": "plan:pro"
            }
          ]
        }
      ]
    }
  ]
}

Changes