Email Campaigns A/B TestsDelete an A/B Test for an Email Campaign Activity
Delete an A/B Test for an Email Campaign Activity
To delete an A/B test for a primary campaign activity make a DELETE call to emails/activities/{campaign_activity_id}/abtest. Deleting an A/B test returns the type back to NEWSLETTER and the type_code back to 10. You can only delete A/B tests that have a current_status of DRAFT. After an A/B test is deleted, when sending the email campaign activity Constant Contact uses the original subject line rather than the alternate A/B test subject line.
Authorization Requirements
User privileges: campaign:writeAuthorization scopes: campaign_data
Parameters
Use the campaign_activity_id URL parameter to delete an A/B test for a primary email campaign activity that has a current_status of DRAFT. For example: emails/activities/{campaign_activity_id}/abtest.
Example DELETE Email Campaign Activity A/B Test
DELETE
https://api.cc.email/v3/emails/activities/{campaign_activity_id}/abtestOkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.cc.email/v3/emails/activities/b6d041e2-8450-409a-acfb-e858c260f4f6/abtest")
.method("DELETE", body)
.addHeader("Accept", "application/json")
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer {access_token}")
.build();
Response response = client.newCall(request).execute();Response
A successful DELETE call returns a 204 response code and an empty response body.
Try it!