Metrics

Mail metrics

Requires scope: read. Counts of sent, delivered, bounced, complained, received and reply messages per day or hour (UTC). Defaults to the last 30 days by day, or the last 48 hours by hour; at most 366 days or 744 hours per call. A test key counts test mail only and a live key live mail only.

get/v1/metrics

Request

  • Base URL: https://api.mails.ai
  • URL: https://api.mails.ai/v1/metrics
  • Auth: HTTP bearer

Query parameters

fromstring

Start of the range (ISO 8601, or YYYY-MM-DD).

tostring

End of the range, exclusive (ISO 8601, or YYYY-MM-DD).

agent_idstring

Filter by agent id or name. A key tied to one agent always reads that agent's mail, and naming another agent is a 403.

interval'day' | 'hour'

Bucket size.

Response

Buckets for the range, oldest first.

interval'day' | 'hour' required

Bucket size, in UTC: day or hour, as requested; day when the request names none.

fromstring date-time required

Start of the range, inclusive: the requested from moved back to the start of its UTC day or hour. Left out, 30 days before to by day or 48 hours by hour, rounded the same way.

tostring date-time required

End of the range, exclusive, as requested and not rounded, so the last bucket can be partial. Left out, the time of the request.

agent_idstring

The agent the counts are limited to, as its id even when the request gave its name. Absent when they cover every agent; a key tied to one agent always gets its own.

test_modeboolean required

A test key counts test mail only; a live key, live mail only.

Changes

No recorded changes to this operation across all 1 revision of this API.