Constant
Contact
API Guide

Get Email Campaign Activity Send History

To get send history details for an email campaign activity, make a GET call to /emails/activities/{campaign_activity_id}/send_history. Send history details for the campaign_activity_id include:

  • The send ID that uniquely identifies each send (send_id).
  • The contact list ID (contact_lists_ids) used to identify the contacts to which the email campaign activity was sent.
  • If applicable, the segments (segment_ids) used to identify specific contacts to which the email campaign activity was sent.
  • The total number of contacts to which the email campaign activity was sent (count).
  • The date that the email campaign activity was sent (run_date).
  • The status (COMPLETED or ERRORED) of the send (send_status).
  • If an error occurs during the send, the error reason_code and description is returned. If no error occurs, the reason_code is 0, indicating a successful send.

For example:

 {
   "send_id": 1,
   "contact_list_ids": [
       "f4ab800a-5adf-11e9-ba6a-fa163e6b01c1"
      ],
      "count": 2,
      "run_date": "2019-04-18T20:03:08.000Z",
      "send_status": "COMPLETED",
      "reason_code": 0
 }
  

Parameters

This method requires the campaign_activity_id URL parameter of the email campaign activity for which you want to get history details.

Example GET Email Sends History Report Call

The following GET call returns history details for a single email campaign activity.

GET
https://api.cc.email/v3/emails/activities/{campaign_activity_id}/send_history
User privileges: campaign:readAuthorization scopes: campaign_data

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.cc.email/v3/emails/activities/1ead98be-dfa0-4e04-81f7-5f1534d42e9c/send_history")
  .get()
  .addHeader("Content-Type", "application/json")
  .addHeader("Accept", "*/*")
  .addHeader("Authorization", "Bearer {access_token}")
  .addHeader("User-Agent", "PostmanRuntime/7.15.2")
  .addHeader("Cache-Control", "no-cache")
  .addHeader("Postman-Token", "2ea661c8-5e1b-41f6-8d1c-141d0bf93f2e,2b375618-9f49-4850-b1ed-aa480960ce85")
  .addHeader("Host", "your_host")
  .addHeader("Accept-Encoding", "gzip, deflate")
  .addHeader("Connection", "keep-alive")
  .addHeader("cache-control", "no-cache")
  .build();

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

Response

{
  "send_id": 1,
  "contact_list_ids": [
     "f4ab800a-5adf-11e9-ba6a-fa163e6b01c1"
     ],
   "count": 2,
   "run_date": "2019-04-18T20:03:08.000Z",
   "send_status": "COMPLETED",
   "reason_code": 0
    },
    {
  "send_id": 2,
   "contact_list_ids": [
      "f4ab800a-5adf-11e9-ba6a-fa163e6b01c1"
      ],
   "count": 0,
   "run_date": "2019-05-07T14:42:57.000Z",
   "send_status": "COMPLETED",
   "reason_code": 12
}
Try it!

On this page