Skip to main content
PATCH
/
api
/
v1
/
ab-tests
/
{abTestId}
/
variants
/
{variantId}
Update A/B Test Variant
curl --request PATCH \
  --url https://api.sequenzy.com/api/v1/ab-tests/{abTestId}/variants/{variantId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "subject": "<string>",
  "previewText": "<string>",
  "html": "<string>",
  "blocks": [
    {}
  ]
}
'
{
  "success": true,
  "variant": {
    "id": "var_b",
    "label": "B",
    "emailId": "email_def456",
    "subject": "A better subject",
    "previewText": null,
    "blocks": [],
    "localizations": []
  }
}
Update a draft A/B test variant’s subject, preview text, or body content. You can use raw HTML or Sequenzy block JSON for the body.

Request

abTestId
string
required
A/B test ID.
variantId
string
required
Variant ID.
subject
string
Updated subject line.
previewText
string
Updated preview text. Send null to clear it.
html
string
Replacement HTML body. Use this or blocks, not both.
blocks
array
Replacement Sequenzy email blocks. Use this or html, not both. Put block styling under styles; top-level style keys like backgroundColor, backgroundOpacity, borderColor, borderWidth, and borderRadius are normalized into styles.
curl -X PATCH "https://api.sequenzy.com/api/v1/ab-tests/ab_abc123/variants/var_b" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"subject": "A better subject"}'

Responses

{
  "success": true,
  "variant": {
    "id": "var_b",
    "label": "B",
    "emailId": "email_def456",
    "subject": "A better subject",
    "previewText": null,
    "blocks": [],
    "localizations": []
  }
}