Marketing
Configure (replace) the A/B subject test of a draft campaign. 409 when the campaign is not a draft. Honours Idempotency-Key. (scope: marketing_ab:write)
PUT
bearerAuthheader
AuthorizationBearer <token>API key as Bearer token
id*stringCampaign id
Format
uuidIdempotency-Key?stringOptional. A retry with the same key replays the first response (24 h).
Length
length <= 200application/json- body
test_pct*integerShare of the audience used as the test slice
Range
1 <= value <= 50decide_after_minutes*integerRange
15 <= value <= 10080winner_metric*stringValue in
"open""click"variants*array<>Items
2 <= items <= 4OK
application/json- response
data*A campaign with its A/B state and arms.
error*nullcurl -X PUT "https://example.com/marketing/campaigns/497f6eca-6276-4993-bfeb-53cbbbba6f08/ab-test" \ -H "Content-Type: application/json" \ -d '{ "test_pct": 1, "decide_after_minutes": 15, "winner_metric": "open", "variants": [ { "subject": "string" }, { "subject": "string" } ] }'{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "channel": "string", "status": "string", "subject": "string", "ab_test_pct": 0, "ab_decide_after_minutes": 0, "ab_winner_metric": "open", "ab_test_sent_at": "2019-08-24T14:15:22Z", "ab_winner_variant_id": "27e01c5d-74a6-4ff2-b255-d776ad44b883", "ab_decided_at": "2019-08-24T14:15:22Z", "ab_conclusive": true, "ab_winner_reason": "string", "variants": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "label": "string", "subject": "string", "has_body_override": true, "sent_count": 0, "opened_count": 0, "clicked_count": 0, "open_rate": 0, "click_rate": 0 } ] }, "error": null}