Get the send history for a single email campaign.

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:read

Authorization scopes: campaign_data

<?php
$request = new HttpRequest();
$request->setUrl('https://api.cc.email/v3/emails/activities/1ead98be-dfa0-4e04-81f7-5f1534d42e9c/send_history');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'Connection' => 'keep-alive',
  'Accept-Encoding' => 'gzip, deflate',
  'Host' => 'your_host.email',
  'Postman-Token' => '2ea661c8-5e1b-41f6-8d1c-141d0bf93f2e,e1e9db81-186b-4d32-951c-571d429ea088',
  'Cache-Control' => 'no-cache',
  'User-Agent' => 'PostmanRuntime/7.15.2',
  'Authorization' => 'Bearer {access_token}',
  'Accept' => '*/*',
  'Content-Type' => 'application/json'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}

curl -X GET \
  https://api.cc.email/v3/emails/activities/1ead98be-dfa0-4e04-81f7-5f1534d42e9c/send_history \
  -H 'Accept: */*' \
  -H 'Accept-Encoding: gzip, deflate' \
  -H 'Authorization: Bearer {access_token}' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Host: your_host.email' \
  -H 'Postman-Token: 2ea661c8-5e1b-41f6-8d1c-141d0bf93f2e,e2c7bab7-3ab3-4e0e-aa6c-d5d1ab73d7bb' \
  -H 'User-Agent: PostmanRuntime/7.15.2' \
  -H 'cache-control: no-cache'


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!