Email

Get email metrics

Changed on

Account-wide email performance over a date range, across every send path: 1:1 messages, broadcasts and sequences. Per-broadcast numbers stay on GET /broadcasts/{id}/stats and per-step ones on GET /sequences/{id}/stats; this is the rollup.

Two metrics are source-specific, and blending them would misreport: opened, clicked and unsubscribed are broadcast and sequence only (1:1 mail carries no open pixel or link rewriting by design), while suppressed is 1:1-only (marketing sends drop suppressed addresses before delivery rows exist). Group by source to see them apart.

Rates are computed over sent. Grouping by broadcast returns broadcast rows only, by sequence sequence rows only, and by inbox message rows only.

get/email/metrics

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Query parameters

start_date, string date

Inclusive first day, YYYY-MM-DD. Defaults to 6 days before end_date, so the default range is the last 7 days including today.

end_date, string date

Inclusive last day, YYYY-MM-DD. Defaults to today.

group_by, 'period' | 'source' | 'broadcast' | 'sequence' | 'inbox'

Dimension to break the range down by. Omit for totals only.

granularity, 'hour' | 'day' | 'week' | 'month'

Bucket size when group_by=period.

source, 'all' | 'broadcast' | 'sequence' | 'message'

Restrict to one send path.

timezone, string

IANA timezone the day and period boundaries are computed in. Defaults to UTC.

Response

Email metrics for the range

EmailMetrics required
object, 'email_metrics' required
start_date, string date required
end_date, string date required
timezone, string required
source, 'all' | 'broadcast' | 'sequence' | 'message' required
group_by, 'period' | 'source' | 'broadcast' | 'sequence' | 'inbox' | 'null' nullable
granularity, 'hour' | 'day' | 'week' | 'month'

Present only when grouping by period.

totals, object required
data, EmailMetricsBucket[] required

Per-group rows. Empty when group_by is omitted — totals is the whole answer.

Changes

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    4 more changes in this revision