Skip to main content
POST
Create A/B Test
Create a draft A/B test for a campaign in draft or rejected status, or convert a sequence email node into an A/B test step. Provide exactly one of campaignId or automationNodeId. Variant A (the control) is copied from the current email. A campaign or sequence node can have only one A/B test.

Request

string
Campaign to attach the test to. Must be in draft or rejected status. Mutually exclusive with automationNodeId.
string
Sequence action_email node to convert into an action_ab_test step. Mutually exclusive with campaignId. Requires at least one variants entry.
boolean
Required as true when automationNodeId belongs to an active sequence. This acknowledges that the live sequence graph will change immediately.
string
Test name. Defaults to A/B Test for <campaign name>.
number
Campaign-only share of the audience that receives test sends. Must be from 5 to 50. Defaults to 20. Sequence tests use winnerThreshold instead.
number
Campaign-only duration before a winner is selected. Must be from 15 to 1440 minutes. Defaults to 240.
string
Metric used to pick the winner: open_rate or click_rate. Campaigns default to open_rate. For sequence tests, an explicit value overrides the testType default.
string
Sequence variant strategy: subject or content. Subject defaults to open_rate and content defaults to click_rate unless winnerCriteria is explicit. Defaults to content. Sequence tests only.
number
Number of sequence recipients in the test sample, from 10 to 1000. Defaults to 100. Sequence tests only.
array
Extra variants beyond the control. Each item takes subject (required), previewText, and blocks. Total variants cannot exceed 5. Variants without blocks reuse the current email body. Optional for campaign tests; sequence conversions require at least one entry.
For a sequence test, copy the effective values from the source test’s settings object:

Responses