v1

latestSwagger 2.0Private2026-08-04128286690.5 KB
Email Campaigns AB Tests

POST (Create) an A/B Test for an Email Campaign Activity

Use this method to create a new A/B test for a primary email campaign activity. You must specify an alternative subject line, the percentage of contact to use for the A/B test, and the number of hours to wait after the A/B test is sent before determining the winning subject line. To create an A/B test, the campaign must have a current_status of DRAFT. When you create an A/B test, the type changes from Newsletter (code= 10) to A/B Test (code= 57).

post/emails/activities/{campaign_activity_id}/abtest

Path parameters

campaign_activity_idstring required

The unique ID for the primary email campaign activity.

Request body

alternative_subjectstring required

The alternate email subject line to use for A/B testing.

test_sizeinteger required

The percentage of contact recipients to participate in the A/B Test. For example, if the value is 30, then 30% of contacts will receive the email campaign with subject line A, and 30% of contacts will receive the email campaign with subject line B. Valid values include <code>5</code> to <code>50</code> percent. Currently, A/B tests support subject line only.

winner_wait_durationinteger required

The number of hours Constant Contact waits after the A/B test is sent before determining the winning subject line. The winner is the subject line with the highest number of contact opens. Valid values include <code>6</code>, <code>12</code>, <code>24</code>, and <code>48</code>. After the winner is determined, Constant Contact automatically sends the email campaign with the winning subject line to all the remaining contacts, which did not participate in the A/B test.

Example request

{
  "alternative_subject": "Reminder: Our Biggest Sale of the Year is Coming Soon!",
  "test_size": 30,
  "winner_wait_duration": 24
}

Response

Request successful.

alternative_subjectstring required

The alternate email subject line to use for A/B testing.

test_sizeinteger required

The percentage of contact recipients to participate in the A/B Test. For example, if the value is 30, then 30% of contacts will receive the email campaign with subject line A, and 30% of contacts will receive the email campaign with subject line B. Valid values include <code>5</code> to <code>50</code> percent. Currently, A/B tests support subject line only.

winner_wait_durationinteger required

The number of hours Constant Contact waits after the A/B test is sent before determining the winning subject line. The winner is the subject line with the highest number of contact opens. Valid values include <code>6</code>, <code>12</code>, <code>24</code>, and <code>48</code>. After the winner is determined, Constant Contact automatically sends the email campaign with the winning subject line to all the remaining contacts, which did not participate in the A/B test.

Example response

{
  "alternative_subject": "Reminder: Our Biggest Sale of the Year is Coming Soon!",
  "test_size": 30,
  "winner_wait_duration": 24
}