Emails

Retrieve email metrics

Resend-compatible counts and rates over a date range, for transactional and broadcast email together. Leave dimensions out for one totals row; add period, domain, email or broadcast (email and broadcast cannot be combined) to break the numbers down. Each lifecycle timestamp counts in its own period. Sends where every recipient is the SES mailbox simulator are left out. Rates are percentages with one decimal. Open and click metrics need tracking on. Requires the email:read scope.

get/v1/emails/metrics

Request

  • Base URL: https://smtpfa.st/api
  • URL: https://smtpfa.st/api/v1/emails/metrics
  • Auth: HTTP bearer

Query parameters

start_datestring

ISO 8601 date or datetime. A date means midnight in timezone. Defaults to 6 days before end_date.

end_datestring

ISO 8601 date (the whole day is included) or datetime. Future values are clamped to now. Defaults to now.

timezonestring

IANA time zone for dates and periods, e.g. America/New_York. Default UTC.

granularity'hourly' | 'daily' | 'weekly' | 'monthly'

Period size when period is a dimension. Default daily.

metricsstring
Example:sent,delivered,open_rate

Comma-separated metrics to include. Omit for all.

dimensionsstring
Example:period,domain

Comma-separated: period, domain, email, broadcast.

domain_idstring

Comma-separated domain ids, up to 100.

email_idstring

Comma-separated email ids, up to 100. Not with broadcast.

broadcast_idstring

Comma-separated broadcast ids, up to 100. Not with email.

Response

Metrics

objectstring required
start_datestring date-time required
end_datestring date-time required
timezonestring required
metricsstring[] required
dimensionsstring[] required
granularity'hourly' | 'daily' | 'weekly' | 'monthly' required
totalsobject required

One value per requested metric: counts are integers, rates percentages with one decimal.

Example response

{
  "object": "metrics",
  "timezone": "UTC",
  "metrics": [
    "sent",
    "delivered",
    "open_rate"
  ],
  "totals": {
    "sent": 1204,
    "delivered": 1180,
    "open_rate": 50
  },
  "data": [
    {
      "period": "2026-07-01",
      "domain_id": "dom_1",
      "domain_name": "example.com",
      "sent": 172,
      "delivered": 169,
      "open_rate": 49.7
    }
  ]
}

Changes

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