This page is available as Markdown at https://developers.klaviyo.com/en/v2025-01-15/reference/query_metric_aggregates.md. An index of every page is at https://developers.klaviyo.com/llms.txt.
Query and aggregate event data associated with a metric, including native Klaviyo metrics, integration-specific metrics, and custom events (not to be confused with custom metrics, which are not supported at this time). Queries must be passed in the JSON body of your POST request.
To request campaign and flow performance data that matches the data shown in Klaviyo's UI, we recommend the Reporting API.
Results can be filtered and grouped by time, event, or profile dimensions.
For a comprehensive list of request body parameters, native Klaviyo metrics, and their associated attributes for grouping and filtering, please refer to the metrics attributes guide.
List of filters, must include time range using ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
These filters follow a similar format to those in GET requests, the primary difference is that this endpoint asks for a list.
The time range can be filtered by providing a greater-or-equal and a less-than filter on the datetime field.
The timezone used for processing the query, e.g. 'America/New_York'.
This field is validated against a list of common timezones from the IANA Time Zone Database.
While most are supported, a few notable exceptions are Factory, Europe/Kyiv and Pacific/Kanton. This field is case-sensitive.