Constant
Contact
API Guide

Test Send an Email Campaign Activity

Make a POST call to the /emails/activities/{campaign_activity_id}/tests endpoint to send a test email to specific email addresses. Test emails allow you to verify how the email campaign activity will look before you send it to contacts.

You can send up to 50 test emails per day. Each recipient you add to the email_addresses array counts towards this limit. This method returns a 429 "Too many requests" response code if you exceed the test email limit.

The test email does not process any dynamic content in the email campaign activity. Dynamic content includes contact and custom field variables.

URL Parameters

This method requires the campaign_activity_id URL parameter. Use this parameter to specify which primary_email role email campaign activity you want to test send.

Request Body

This method requires a request body that contains:

  • email_addressesRequired. The recipients of the test email as an array of strings. You can include up to 5 email addresses at a time. These email addresses can be any valid email address. They do not need to be verified Constant Contact account email addresses or contact emails.
  • personal_message — A personal message for the recipients of the test email as a string value. Constant Contact displays this message before the email campaign activity content.

For example:

{
  "email_addresses": [
    "dlang@example.com","jacksbbq@example.com"
  ],
  "personal_message": "This is a test send of the email campaign activity."
}

Authorization Requirements

User privileges: campaign:sendAuthorization scopes: campaign_data

Example Post Test Send Call

This example POST call sends a test email to the two recipients in the email_addresses array.

POST
https://api.cc.email/v3/emails/activities/{campaign_activity_id}/tests
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"email_addresses\": [\n    \"dlang@example.com\",\"jacksbbq@example.com\"\n  ],\n  \"personal_message\": \"This is a test send of the email campaign activity.\"\n}");
Request request = new Request.Builder()
  .url("https://api.cc.email/v3/emails/activities/{campaign_activity_id}/tests")
  .post(body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Basic {access_token}")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Response

A successful request returns a 204 No Content response code without a response body.

Try it!

On this page