Automations

Get automation action metrics

Changed on

Returns metrics for an individual action, both in total and 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.

Multi-language messages

If the action is a multi-language message, you can retrieve metrics for a single language variant or all language variants. To retrieve metrics for a single language variant, pass the id of the action. To retrieve aggregate metrics and a breakdown for each language variant, pass the multi_language_branch_action_id, which is the same for each variant of a message. You can get both ids from the List automation actions endpoint.

If you pass the multi_language_branch_action_id, then the metric object shows the total across every variant. The language_variants object shows a breakdown for each language variant.

If you want to get the sum of all metrics across all of an automation's actions, you can use each action id of a multi-language message, like you would for other types of actions.

get/v1/campaigns/{campaign_id}/actions/{action_id}/metrics

Request

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

Response

Returns action metrics by series, where each increment is based on the res in your request. For a multi-language message, also returns a per-variant breakdown in language_variants.

startstring ISO 8601

The start of the window we reported on, in ISO 8601 format.

endstring ISO 8601

The end of the window we reported on, in ISO 8601 format.

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

The resolution we reported at.

language_variantsLanguageVariantMetrics

Metrics for each language variant of a multi-language message, keyed by the variant's action ID. Only returned when you request metrics for a multi-language branch action.

Example response

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

Changes