Campaigns

Generate section options

Changed on

Generates 1 to 4 alternative versions of selected sections (top-level blocks) of the email or of one variation, and returns them without saving anything. Each option holds replacement blocks that keep the selected blocks' ids; apply one by swapping those blocks into the variation's blocks and calling Update variation. Changes the AI makes outside the selected sections are dropped. Runs synchronously and can take up to a minute.

post/campaigns/{campaignId}/variations/section-options

Request

  • Base URL
    https://api.sequenzy.com/api/v1
  • URL
    https://api.sequenzy.com/api/v1/campaigns/{campaignId}/variations/section-options
  • Auth
    HTTP bearer

Path parameters

campaignIdstring required

Campaign ID

Request body

variationIdstring

Vary this variation's sections. Omit to vary the email's saved content.

sectionIdsstring[] required

Ids of top-level blocks to vary.

promptstring required
countinteger
style'close' | 'fresh' | 'bold'

How far the options move from the selected sections. close stays near them; fresh and bold try clearly different takes. Defaults to fresh.

Response

Options. Options that changed nothing are left out, so there can be fewer than count.

successboolean

Example response

{
  "success": true,
  "options": [
    {
      "name": "Shorter headline",
      "replacements": [
        {
          "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