Skip to content

Remove Split Test Variant

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

Removes one test variant from the split test of a campaign and returns the remaining variants. The variant is its own email: removing it deletes that email with everything in it, and there is no undo. The last variant cannot be removed, and a test that has started refuses the change. Removing a variant redistributes the audience share evenly. Test settings are written through configure-newsletter-split-test. Nothing is sent.

Input schema

campaignIdinteger, >= 1required

ID of the split test campaign the variant belongs to

emailIdinteger, >= 1required

Email ID of the variant to remove, as get-newsletter returns it in splitTestVariants

accountIdnull or integer, >= 1

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

Default:null
Input example
{ "campaignId": 1, "emailId": 1, "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 }