Analytics API

The same figures the dashboard shows: how much you have sent, how much arrived, and how close you are to your monthly quota. Useful for a status panel of your own, a weekly report, or an alert when a bounce rate moves in the wrong direction. For the individual events behind these totals, use the Logs API.

Scope

Needs email:read. Figures are scoped to the key's team.

GET/v1/analytics

Totals, rates, a 30 day daily series and current usage against your plan.

Parameters

ParameterTypeRequiredDescription
daysnumberNoAdd a window block covering the last N days. 1 to 90. Defaults to 30 when a window is requested.
domainstringNoRestrict the window block to one verified sending domain. Returns 404 if the domain is not yours.

Response

json
{
  "total": 24707,
  "sent": 24190,
  "today": 312,
  "thisWeek": 2190,
  "delivered": 23610,
  "bounced": 402,
  "complained": 11,
  "failed": 157,
  "pending": 320,
  "canceled": 40,
  "awaitingReport": 167,
  "deliveryRate": 98.3,
  "bounceRate": 1.7,
  "daily": [
    { "date": "2026-08-22", "sent": 780, "delivered": 761, "bounced": 12 }
  ],
  "usage": {
    "period": "2026-09",
    "sent": 8420,
    "delivered": 8201,
    "bounced": 140,
    "limit": 50000,
    "tier": "pro"
  }
}

Scoping to a window or a domain

Without parameters the response covers all time, plus a fixed 30 day daily series. Passing days or domain adds a window block alongside the all-time numbers rather than replacing them.

# all time, plus a 30 day daily series
curl https://smtpfa.st/api/v1/analytics \
  -H "Authorization: Bearer $SMTPFAST_API_KEY"

# add a scoped window: the last 7 days for one sending domain
curl "https://smtpfa.st/api/v1/analytics?days=7&domain=acme.com" \
  -H "Authorization: Bearer $SMTPFAST_API_KEY"

Reading the rates

delivered counts mail the receiving server accepted, which includes messages later opened or clicked. A complained email was delivered too, so deliveryRate counts it as delivered. bounceRate is the one to watch: mailbox providers start treating a sender differently well before it reaches a few percent, so a rising trend matters more than any single day.

Rates are worked out against the emails that went out and have a delivery or bounce report: sent minus awaitingReport. Right after a large send many emails are still waiting for that report, and counting them would pull the delivery rate down for a while. Scheduled and queued emails are counted in pending and stay out of the rates until they send, so scheduling a broadcast never moves them. today, thisWeek and the daily series count by the time an email was sent, over the last 24 hours, the last 7 days and the last 30 days. total counts every email, whatever its status.

Email metrics

GET /v1/emails/metrics takes the same parameters and returns the same shape as Resend's Email Metrics API. It counts transactional and broadcast email together, and each lifecycle timestamp counts in its own period. Rates are percentages with one decimal.

GET/v1/emails/metrics

Counts and rates over a date range, optionally broken down.

Metrics: received, sent, delivered, delivery_delayed, failed, suppressed, bounced, bounced_transient, bounced_permanent, bounced_undetermined, opened, unique_opened, clicked, unique_clicked, complained, unsubscribed, delivery_rate, open_rate, click_rate, bounce_rate, complaint_rate, unsubscribe_rate. The email and broadcast dimensions cannot be combined.

Parameters

ParameterTypeRequiredDescription
start_datestringNoISO 8601 date or datetime; default 6 days before end_date
end_datestringNoISO 8601 date (whole day included) or datetime; default now
timezonestringNoIANA time zone for dates and periods, default UTC
granularitystringNohourly, daily, weekly or monthly (with the period dimension)
metricsstringNoComma-separated, e.g. sent,delivered,open_rate; default all
dimensionsstringNoComma-separated: period, domain, email, broadcast
domain_idstringNoComma-separated ids, up to 100
email_idstringNoComma-separated ids, up to 100
broadcast_idstringNoComma-separated ids, up to 100

Response

json
{
  "object": "metrics",
  "start_date": "2026-07-01T00:00:00.000Z",
  "end_date": "2026-07-08T00:00:00.000Z",
  "metrics": ["sent", "delivered", "open_rate"],
  "dimensions": ["period"],
  "granularity": "daily",
  "totals": { "sent": 1204, "delivered": 1180, "open_rate": 50.0 },
  "data": [ { "period": "2026-07-01", "sent": 172, "delivered": 169, "open_rate": 49.7 } ]
}

Clicked links

The links people clicked across all email, the same data as the Links page. Resend lists clicked links per broadcast only; this covers every email.

GET/v1/emails/clicked-links

Top clicked links, or one link in detail with url.

Parameters

ParameterTypeRequiredDescription
daysintegerNo1 to 365, default 30
domain_idstringNoOnly email sent from this domain
urlstringNoOne exact destination URL for detail

Response

json
{
  "object": "list",
  "days": 30,
  "total_clicks": 412,
  "unique_clicks": 268,
  "distinct_links": 9,
  "truncated": false,
  "data": [ { "url": "https://example.com/pricing", "clicks": 120, "unique_clicks": 88 } ]
}