I’m trying to reproduce the old approach of querying /metrics + /metric-aggregates to get daily counts broken down by attributed campaign or flow (e.g. “Opened Email by $attributed_campaign”). In previous versions, a POST to:
https://a.klaviyo.com/api/metric-aggregates
used to return a valid response. Now, with the same revision: 2025-04-15 header and “2025-05-01T00:00:00” date formats, I get a 400 Bad Request (“Invalid input.”). Likewise, a simple GET /metrics?filter=equals(integration.name,"Klaviyo")&fields[metric]=id,name also returns 400.
Questions:
-
Does
/metric-aggregatesstill support grouping by$attributed_campaignor$attributed_flowin the latest API? If so, what is the minimal working request (headers + body)? -
Is there a required header or content type I’m missing (e.g.
content-type: application/vnd.api+json)? -
If the Metrics API no longer allows campaign/flow grouping, what is the recommended alternative for programmatically retrieving “per-campaign” or “per-flow” aggregates today?

