Make a GET call to the /reports/summary_reports/sms_campaign_summaries
endpoint to get SMS campaign summary details, including the total number of times that each contact uniquely interacted with each tracked campaign activity and the aggregated percents for each SMS campaign returned on a page of results.
You must specify a start_at
date using ISO 8601 format. Only summary details for SMS campaigns sent on or after the start_at
date you specify are returned. Optionally, in addition to the start_at
date, specify an end_at
date to limit results to only return summary details for SMS campaigns sent on or after the start_at
and on or before the end_at
you specify.
Use the limit
query parameter to limit the number of results returned per page, ranging from 1 to 50. Results are sorted in descending order by the date the SMS was last sent (last_sent_date
).
Example Response
The following example response uses the limit
query parameter to return two SMS campaigns results per page. If returned, use the link to get the next page of results.
{
"bulk_sms_campaign_summaries": [
{
"campaign_id": "9d30c391-2b85-4d6a-84ad-00fa2d31cd03",
"campaign_name": "Spring Campaign",
"last_sent_date": "2024-04-02T17:13:13.000-04:00",
"unique_counts": {
"sends": 60,
"clicks": 50,
"optouts": 0,
"delivers": 60,
"bounces": 0
},
"campaign_type": "SMS"
},
{
"campaign_id": "g90ea686-239f-43d8-9770-c76f7afefd6d",
"campaign_name": "Clearance Campaign",
"last_sent_date": "2024--02-01T14:58:22.000-04:00",
"unique_counts": {
"sends": 60,
"clicks": 50,
"optouts": 0,
"delivers": 60,
"bounces": 0
},
"campaign_type": "SMS"
}
],
"aggregate_percents": {
"deliver": 100,
"click": 83,
"bounce": 0,
"unsubscribe": 0
},
"_links": {
"next": {
"href": "/v3/reports/summary_reports/sms_campaign_summaries?next=C2FtcGFpZ25fdHlwZXM9MTgsMTAsMTEsMzAsMTUsMiw0MywxMiwyNCwxLDU3LDIwLDIxLDI2LDIzLDI1LDE2LDE5LDIyLDQ0LDE0LDE3JmxpbWl0PTEmbz0xJmNsaWNrX3JhdGVfbWV0aG9kPW92ZXJfc2VuZFU"
}
}
}
Unique SMS Counts
sends
: The total number of unique sends.clicks
: The total number of unique clicks.optouts
: The total number of unique opt-outs (unsubscribes).delivers
: The total number of SMS delivered.bounces
: The total number of unique bounces.
Aggregate Percents
deliver
: The aggregated SMS delivery rate for all campaigns on the current results page.click
: The aggregated click rate for all campaigns on the current results page.bounce
: The aggregated bounce rate for all campaigns on the current results page.unsubscribe
: The aggregated unsubscribe (opt-out) rate for all campaigns on the current results page.
Example GET Request
GET https://api.cc.email/v3/reports/summary_reports/sms_campaign_summaries
Endpoint Requirements
User privileges: ui:campaign:metrics
Authorization scopes: campaign_data
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.cc.email/v3/reports/summary_reports/sms_campaign_summaries?limit=22&start_at=2022-01-27T21%3A56%3A37.011Z&end_at=2022-06-22T21%3A56%3A37.011Z',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Accept: */*',
'Authorization: Bearer {access_token}'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
curl --location 'https://api.cc.email/v3/reports/summary_reports/sms_campaign_summaries?limit=22&start_at=2022-01-27T21%3A56%3A37.011Z&end_at=2022-06-22T21%3A56%3A37.011Z' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'Authorization: Bearer {access_token}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.cc.email/v3/reports/summary_reports/sms_campaign_summaries?limit=22&start_at=2022-01-27T21%3A56%3A37.011Z&end_at=2022-06-22T21%3A56%3A37.011Z")
.method("GET", body)
.addHeader("Content-Type", "application/json")
.addHeader("Accept", "*/*")
.addHeader("Authorization": "Bearer {access_token}")
.build();
Response response = client.newCall(request).execute();