GET/emails/metrics

Get account-level email metrics

Retrieves account-level email metrics for a date range, optionally broken down by dimensions. Use metrics and dimensions to choose the returned measures and breakdowns, and use the ID filters to restrict the data.

9 parameters
start_datestringoptional
The start of the date range as an ISO 8601 date or datetime; must be on or before `end_date`. Defaults to 6 days before `end_date` when omitted.
end_datestringoptional
The end of the date range as an ISO 8601 date or datetime; future values are clamped to the current time. Defaults to now when omitted.
timezonestringoptional
The IANA timezone used to bucket periods when `period` is included in `dimensions`. Defaults to UTC when omitted.
Default:UTC
granularitystringoptional
The bucket size when `period` is included in `dimensions`: hourly, daily, weekly, or monthly. The date range cannot produce more than 10,000 periods at the selected granularity. Defaults to daily when omitted.
Allowed:hourlydailyweeklymonthlyDefault:daily
metricsarray<string>optional
The metrics to include, supplied as a comma-separated value, repeated parameters, or a mix of both. Defaults to all metrics when omitted.
dimensionsarray<string>optional
The dimensions for breaking down results: period, domain, email, or broadcast. `email` cannot be combined with `broadcast`; defaults to an empty list, returning totals without `data`.
domain_idarray<string>optional
Up to 100 sending-domain UUIDs to restrict the results to; accepts comma-separated values, repeated parameters, or a mix of both.
email_idarray<string>optional
Up to 100 email UUIDs to restrict the results to; cannot be combined with the `broadcast` dimension or `broadcast_id`. Accepts comma-separated values, repeated parameters, or a mix of both.
broadcast_idarray<string>optional
Up to 100 broadcast UUIDs to restrict the results to; cannot be combined with the `email` dimension or `email_id`. Accepts comma-separated values, repeated parameters, or a mix of both.

1 status code
200Returns the requested date range, selected metrics and dimensions, granularity, totals, and breakdown rows when dimensions are requested.
objectstringoptional
Type of the response object.
start_datestringoptional
The start of the requested date range, as an ISO 8601 datetime.
end_datestringoptional
The end of the requested date range, as an ISO 8601 datetime.
metricsarray<string>optional
The metrics included in the response.
dimensionsarray<string>optional
The dimensions the response is broken down by.
granularitystringoptional
The bucket size used when `period` is in `dimensions`.
Allowed:hourlydailyweeklymonthly
totalsobjectoptional
The requested metrics, totaled over the whole date range.
dataarray<object>optional
One row per unique combination of the requested `dimensions`. Omitted when `dimensions` is empty.

Error handling

start_date and end_date must be ISO 8601 dates or datetimes, and start_date must be on or before end_date. granularity must be hourly, daily, weekly, or monthly; email and broadcast cannot be combined as dimensions, and the corresponding ID filters cannot be combined with the incompatible dimension or filter. Each ID filter accepts up to 100 UUIDs.