Note: This method is only for use with primary_email
and resend
role email campaign activities.
Make a GET call to the /reports/email_reports/{campaign_activity_id}/tracking/sends
endpoint to get an email sends report listing the contacts to which a specified email campaign activity was sent.
The email sends report provides information about each contact, such as the contact’s email address, unique contact ID, and the date and time that you sent the email campaign activity. For example:
{
"contact_id": "4399ce90-5b89-11e7-ba80-00163e498a18",
"campaign_activity_id": "6cc0d637-cf3d-4ac6-aad7-21567698138",
"tracking_activity_type": "em_sends",
"email_address": "jake_dodge@jakedodgepancakes.com",
"created_time": "2019-05-16T21:14:00.000Z"
}
If you have not sent the email campaign activity to contacts, this method returns a successful 200 response code and an empty tracking_activities
array. For example:
{
"tracking_activities": []
}
You can confirm that Constant Contact successfully sent an email campaign activity by making a GET call to /emails/activities/{campaign_activity_id}
and checking that the email campaign activity has a status of Done
. For more information, see the Get an Email Campaign Activity topic.
Parameters
This method requires the campaign_activity_id
URL parameter of the email campaign activity for which you want to get an email sends report. Optionally, you can choose to limit the number of email sends activities to return on each page by using the limit
query parameter.
Query Parameters
This method does not currently support filtering results using the email sends report created_time
timestamp.
Example GET Email Sends Report Call
This example GET call returns an email sends report listing contacts sent the email campaign activity.
GET https://api.cc.email/v3/reports/email_reports/cd1c8cdf384-15ca-4dcc-9b6f-4c91121fdc23/tracking/sends?limit=2
Endpoint Requirements
User privileges: ui:campaign:metrics
Authorization scopes: campaign_data
<?php
$request = new HttpRequest();
$request->setUrl('https://api.cc.email/v3/reports/email_reports/6cc0d637-cf3d-4ac6-aad7-21567698eb38/tracking/sends?limit=2');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders(array(
'cache-control' => 'no-cache',
'Connection' => 'keep-alive',
'Accept-Encoding' => 'gzip, deflate',
'Host' => 'host_name.com',
'Postman-Token' => 'ded18673-eeb1-4c09-8957-ac27ffb2a30f,56b9cb4e-0e55-4bf7-ab5c-9db8d1e8cbdd',
'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;
}
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.cc.email/v3/reports/email_reports/6cc0d637-cf3d-4ac6-aad7-21567698eb38/tracking/sends?limit=2")
.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", "77b6dbee-5f1a-41d7-9696-e1a048b20589,bd35d7eb-77ba-4e04-a562-cae8b12792c7")
.addHeader("Host", "host_name.com")
.addHeader("Accept-Encoding", "gzip, deflate")
.addHeader("Connection", "keep-alive")
.addHeader("cache-control", "no-cache")
.build();
Response response = client.newCall(request).execute();
curl -X GET \
https://api.cc.email/v3/reports/email_reports/cd1c8cdf384-15ca-4dcc-9b6f-4c91121fdc23/tracking/sends?limit=2
-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: host_name.com' \
-H 'Postman-Token: ded18673-eeb1-4c09-8957-ac27ffb2a30f,6234d3fd-694c-4a84-a404-2e7ad89a6f1b' \
-H 'User-Agent: PostmanRuntime/7.15.2' \
-H 'cache-control: no-cache'
Response
{
"tracking_activities": [
{
"contact_id": "4399ce90-5b89-11e7-ba80-00163e498a38",
"campaign_activity_id": "6cc0d637-cf3d-4ac6-aad7-21567698eb38",
"tracking_activity_type": "em_sends",
"email_address": "jake_dodge@jakedodgepancakes.com",
"created_time": "2019-05-16T21:14:00.000Z"
},
{
"contact_id": "4399f5a0-5b89-11e7-ba80-00163e498a38",
"campaign_activity_id": "6cc0d637-cf3d-4ac6-aad7-21567698eb38",
"tracking_activity_type": "em_sends",
"email_address": "jake_dodge@jakedodgepancakes.com",
"created_time": "2019-05-16T21:14:00.000Z"
}
],
}