Skip to main content
POST
Select A/B Test Winner
Select a variant as the winner of a campaign or sequence A/B test.
  • Campaign tests must be in the testing phase. Selection immediately queues winner delivery for the remaining audience. Repeating the same selection safely repairs an interrupted queue operation; selecting a different winner returns a conflict.
  • Sequence tests can be in any phase except completed or cancelled. You can also change a winner that was already selected, including one picked automatically after the test reached its winnerThreshold and one variant led on the winning metric. The test needs at least two variants. Everyone who reaches the step from then on gets the new winner. Contacts who already got a variant keep it. Only the test currently attached to its sequence step can be changed. Repeating the same selection returns 200 without changing winnerSelectedAt. The response abTest has the same shape as Get A/B Test.

Request

string
required
Campaign or sequence A/B test ID.
string
required
Variant ID to select as the winner.
boolean
Sequence tests only. Required as true when the sequence is active, because the new winner goes to everyone who reaches the step from then on. Not needed to repeat the current winner. Campaign tests ignore it.
The API key needs ab_tests:write. Campaign tests also need campaigns:send; sequence tests also need sequences:write.

Responses

For campaign tests, a pending audience change returns 409. Wait for it to apply, or discard a failed change before selecting your winner. You can record a winner while paused; delivery waits until you resume the campaign. If queue publication returns 500 after selection, GET the test and repeat the same winner ID. That retry repairs delivery without changing the winner or resending committed recipients. 400 covers an invalid phase, a missing or inactive campaign, a sequence test that is no longer attached to its step or has only one variant, or a missing confirmLiveChange for an active sequence; 401/403 cover authentication, scope and role restrictions; 404 means the test or the requested variant is unavailable.