Constant
Contact
API Guide

Schedule an Email Campaign Activity

Make a POST call to the /emails/activities/{campaign_activity_id}/schedules endpoint to schedule an email campaign activity.

You must specify which contacts you want to receive an email campaign activity before you schedule it. Use PUT /emails/activities/{campaign_activity_id} to add contacts to an email campaign activity using the contact_list_ids array or the segments_ids array. For more information, see the Update an Email Campaign Activity topic.

You can only schedule email campaign activities that have the primary_email role and are in DRAFT, DONE, or ERROR status.

DRAFT — An email campaign activity you created but have not sent to contacts. You can update email campaign activities when they are in DRAFT status for each email campaign activity format_type.

DONE — An email campaign activity that Constant Contact successfully sent to contacts. You can update email campaign activities when they are in DONE status if the email campaign activity uses format_type 3.

ERROR — An email campaign activity that encountered an error.

Resend an Email Campaign Activity to New Contacts

Resend an email campaign activity by scheduling the email campaign activity when it is in DONE status. When you schedule an email campaign activity in DONE status, Constant Contact does not send the email campaign activity to contacts that already received it. Constant Contact only sends the email campaign activity to new contacts in the contact lists or segment you use.

Parameters

This method requires:

  • The campaign_activity_id URL parameter to specify which email campaign activity you want to schedule.

  • The scheduled_date request body property to specify when you want Constant Contact to send the email campaign activity.

    • To schedule when to send the email campaign activity, enter the scheduled_date as a string value in ISO-8601 format. The results return the date you enter. For example: "scheduled_date": "2019-08-24T14:15:22Z"
    • To send the email campaign activity immediately, use 0 as the scheduled_date. The results return an empty array.

Authorization Requirements

User privileges: campaign:sendAuthorization scopes: campaign_data

Example POST Schedule Call

This example POST call schedules an email campaign activity.

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

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"scheduled_date\": \"2022-05-10T12:53:55.104Z\"\n}");
Request request = new Request.Builder()
  .url("https://api.cc.email/v3/emails/activities/3cfe7b98-3633-4065-950e-de0baeb17563/schedules")
  .post(body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer {access_token}")
  .addHeader("cache-control", "no-cache")
  .addHeader("Postman-Token", "c1902d53-2846-4174-8184-258a090f7e20")
  .build();

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

Response

[
    {
        "scheduled_date": "2022-05-10T12:53:55.000Z"
    }
]

Example Send Now Call

This example POST call immediately sends an email campaign activity.

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

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"scheduled_date\": \"0\"\n}");
Request request = new Request.Builder()
  .url("https://api.cc.email/v3/emails/activities/1ead98be-dfa0-4e04-81f7-5f1534d42e9c/schedules")
  .post(body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer {access_token}")
  .addHeader("cache-control", "no-cache")
  .addHeader("Postman-Token", "72dfdbe9-a7a7-4382-a4d9-37ad07a6aa5b")
  .build();

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

Response

[
    {
        "scheduled_date": "2019-05-16T13:38:55.000Z"
    }
]
Try it!

On this page