Get automation action metrics
Changed onReturns 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.
Request
- Base URLhttps://api.customer.io
- URLhttps://api.customer.io/v1/campaigns/{campaign_id}/actions/{action_id}/metrics
- AuthHTTP 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.
Example response
{
"start": "2025-01-01 00:00:00 +0000 UTC",
"end": "2025-01-02 00:00:00 +0000 UTC",
"res": "days"
}Changes
- info
added the media type
application/jsonfor the response with the status
- info