A/B Tests
Update A/B test variant
Updates a draft A/B test variant's subject, preview text, or body content.
patch/ab-tests/{abTestId}/variants/{variantId}
Path parameters
abTestIdstring required
A/B test ID.
variantIdstring required
Variant ID.
Request body
Example request
{
"html": "<h1>Hello</h1>",
"blocks": [
{
"id": "block_123",
"type": "html",
"content": "<h1>Hello</h1>",
"styles": {
"backgroundColor": "#f8fafc",
"backgroundOpacity": 80,
"textColor": "#111827",
"borderRadius": 12,
"borderColor": "#cbd5e1",
"borderWidth": 1
}
}
]
}Response
Variant updated
Example response
{
"success": true,
"variant": {
"id": "var_a",
"variantId": "var_a",
"abTestId": "ab_abc123",
"label": "A",
"variantLabel": "A",
"emailId": "email_abc123",
"subject": "Welcome",
"blocks": [
{
"id": "block_123",
"type": "html",
"content": "<h1>Hello</h1>",
"styles": {
"backgroundColor": "#f8fafc",
"backgroundOpacity": 80,
"textColor": "#111827",
"borderRadius": 12,
"borderColor": "#cbd5e1",
"borderWidth": 1
}
}
]
}
}