Choose A/B Test Winner
Chooses the version of an A/B test that is sent to the rest of the audience, in place of the automatic choice. The automatic choice is the version with the highest abTestConfig.winnerMetric; winnerReason says whether its lead was significant. Allowed once the test group has been sent (abTestConfig.status is AWAITING_WINNER, or ROLLED_OUT with no rollout email sent yet). During the wait, the chosen version is sent when the wait ends. Sets abTestConfig.winnerMessageId and winnerReason MANUAL.
Authorization
Authorization In: header
Path Parameters
ID of the project that owns the campaign.
ID of the A/B test campaign.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
ID of the version to send to the rest of the audience, from messages[].id. null takes a choice back while abTestConfig.status is AWAITING_WINNER, so the automatic choice applies again.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/projects/string/email-campaigns/string/ab-test-winner" \ -H "Content-Type: application/json" \ -d '{ "messageId": "string" }'{ "id": "string", "createdAt": "string", "updatedAt": "string", "projectId": "string", "name": "string", "status": "DRAFT", "type": "STANDARD", "workflowId": "string", "workflowStepId": "string", "sentAt": "string", "scheduleSetAt": "string", "contactListId": "string", "contactsFilterGroups": [], "lastSuccessContactId": "string", "lastSuccessContactCreatedAt": "string", "sendCursor": { "distinctId": "string", "sortValue": "string" }, "sendOrderByProperty": { "direction": "asc", "propertyKey": "string" }, "providerSendState": { "baseline": { "computedAt": "string", "providers": { "property1": { "aged": 0, "personOpened": 0 }, "property2": { "aged": 0, "personOpened": 0 } } }, "checkedAt": "string", "lanes": { "property1": { "deferred": true, "held": { "at": "string", "finding": "string", "kind": "bounces" }, "passed": 0, "released": true, "skipped": true }, "property2": { "deferred": true, "held": { "at": "string", "finding": "string", "kind": "bounces" }, "passed": 0, "released": true, "skipped": true } }, "pausedForProviders": true, "rescanFrom": { "cursor": { "distinctId": "string", "sortValue": "string" } }, "slowPass": true }, "abTestConfig": { "variable": "SUBJECT", "samplePercent": 20, "winnerMetric": "OPEN_RATE", "winnerWaitHours": 4, "winnerWaitUnit": "HOURS", "sendTimeDelayHours": 2, "sendTimeDelayUnit": "HOURS", "winnerMessageId": "string", "winnerReason": "SIGNIFICANT", "winnerSelectedAt": "string", "winnerRolloutAt": "string", "winnerWaitStartedAt": "string", "status": "AWAITING_SAMPLE", "samplePassStartedAt": "string" }, "utmConfig": { "enabled": true, "params": { "campaign": "", "content": "", "medium": "", "source": "", "term": "" } }, "localSendTimeZone": "string", "localSendPendingAt": "string", "localSendState": { "day": 0, "dayStartSendCount": 0, "fallbackCursor": { "distinctId": "string", "sortValue": "string" }, "fallbackDone": true, "fallbackHeld": true, "knownZoneSent": 0 }, "sendCount": 0, "sendingTargetDurationMs": 0, "sendPaginationCount": 0, "messages": []}Cancel Scheduled Email Campaign
Cancels a scheduled send. The campaign returns to DRAFT with its scheduledAt cleared and nothing is sent. Edit it and call Send Email Campaign to send or schedule it again. Only a SCHEDULED campaign can be cancelled; to change the time instead, call Send Email Campaign with a new scheduledAt.
Create Campaign Variation
Adds a variation to a draft or paused campaign. The new variation copies the first one, then applies `changes`. Same content fields as Update Campaign Message, including subjectHTML, subjectJSON, bodyHTML, bodyJSON, previewTextHTML, and previewTextJSON. A second variation on a STANDARD campaign sets the type to AB_TEST. Returns the variation and a permalink that opens the message step in the editor.