Automations

Get automation metrics

Changed on

Returns metrics for an individual automation as a series of counts, oldest first—the 0-index of any result is the oldest point in the window.

We recommend version 2. Send version=2. It accepts an explicit start, end, and res, reported in the tz you choose. Without it, the endpoint answers with version 1 behavior instead: a window built from period and steps, always in Eastern time.

Version 1 can't return fewer than 2 steps of any period. ?period=days&steps=1 means two days—the 48 hours before the request—and ?period=days&steps=0 returns the maximum for the period, the same as ?period=days&steps=45.

get/v1/campaigns/{campaign_id}/metrics

Request

  • Base URL
    https://api.customer.io
  • URL
    https://api.customer.io/v1/campaigns/{campaign_id}/metrics
  • Auth
    HTTP bearer

Response

Returns automation metrics by series based on the parameters of the request.

startstring ISO 8601

The start period set in the request, in ISO 8601 format.

endstring ISO 8601

The end period set in the request, in ISO 8601 format.

res'hours' | 'hourly' | 'days' | 'daily' | 'weeks' | 'weekly' | 'months' | 'monthly'

The resolution for metrics set in the request.

Example response

{
  "start": "2025-01-01 00:00:00 +0000 UTC",
  "end": "2025-01-02 00:00:00 +0000 UTC",
  "res": "days"
}

Changes