Constant
Contact
API Guide
Contact ReportingGet Open and Click Rates

Get Open and Click Rates

Use the /reports/contact_reports/{contact_id}/open_and_click_rates endpoint to retrieve open and click rates for a specific contact.

The endpoint requires two query parameters, start and end, that define a date range for the report. The start and end query parameters must be provided in ISO 8601 format. For example: 2018-08-16T12:30:00Z. The date range cannot exceed five years from start to end.

Example GET Request

GET
https://api.cc.email/v3/reports/contact_reports/{contact_id}/open_and_click_rates

Endpoint Requirements

User privileges: ui:campaign:metricsAuthorization scopes: contact_data
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.cc.email/v3/reports/contact_reports/{contact_id}/open_and_click_rates?start=2018-01-01T00:00:00.000Z&end=2018-08-09T00:00:00.000Z")
  .get()
  .addHeader("Accept", "application/json")
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer {access_token}")
  .addHeader("Cache-Control", "no-cache")
  .build();

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

Example GET Response

{
  "contact_id": "71600990-908b-11e6-907f-00166bff25",
  "included_activities_count": 10,
  "average_open_rate": 0.6,
  "average_click_rate": 0.6
}

The response returns the total number of campaign activities (included_activities_count) used to calculate the average open and click rates.

Try it!

On this page