Skip to content

Add Split Test Variant

Tool name: add-newsletter-split-test-variant

Adds a test variant to the split test of a campaign and returns the test with all its variants and their editorUrl. With "copyFromEmailId" the variant is a copy of an existing one, otherwise it is empty. A split test needs at least two variants before it can be sent; a fresh one has exactly one. Adding a variant redistributes the audience share evenly. Refused once the test has started. The contents of a variant are written through the tools that take its editorUrl, its subject and preheader through update-newsletter-split-test-variant, the test settings through configure-newsletter-split-test. Nothing is sent.

Input schema

campaignIdinteger, >= 1required

ID of the split test campaign (a newsletter ID)

copyFromEmailIdnull or integer, >= 1

Email ID of the variant to copy, from splitTestVariants; omit for an empty variant

Default:null
accountIdnull or integer, >= 1

User ID of the account; omit for the account the access token works in

Default:null
Input example
{ "campaignId": 1, "copyFromEmailId": null, "accountId": null }

Output schema

accountIdintegerrequired
newsletterIdintegerrequired
variantsArray of objectsrequired
variantCountintegerrequired
needsMoreVariantsbooleanrequired
sharePerVariantPercentintegerrequired
testSizePercentintegerrequired
testDurationHoursintegerrequired
winnerBystring or nullrequired
hasStartedbooleanrequired
Output example
{ "accountId": 0, "newsletterId": 0, "variants": [ { "emailId": 0, "label": "string", "name": "string", "subject": "string", "editorUrl": "string", "contentRevision": "string" } ], "variantCount": 0, "needsMoreVariants": true, "sharePerVariantPercent": 0, "testSizePercent": 0, "testDurationHours": 0, "winnerBy": "string", "hasStarted": true }