Campaigns

Update variation

Changed on

Renames a variation or replaces its content. Content (blocks, html, subject, previewText) can only change once the variation is ready. Provide at least one field.

patch/campaigns/{campaignId}/variations/{variationId}

Request

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

Path parameters

campaignIdstring required

Campaign ID

variationIdstring required

Variation ID

Request body

namestring
summarystring nullable
htmlstring
subjectstring nullable
previewTextstring nullable
emailThemeobject nullable

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.

fontFamilystring nullable

The variation's own body font stack. Null uses the email's font.

Example request

{
  "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"
        }
      ]
    }
  ]
}

Response

Variation updated

successboolean
warningsstring[]

Block fields that were accepted but had no effect.

Example response

{
  "success": true,
  "variation": {
    "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