API Reference

Retrieve Email Metrics

GET /emails/metrics — counts of sent, delivered, opened, clicked, bounced and more for a date range.

GET/emails/metrics

Counts what happened to your account's email over a range of UTC days. With no dimensions you get one row of totals. Add period, domain or campaign to split the counts by day, by sending domain or by campaign (any combination).

sent and failed count emails by the time they were sent. The engagement counters (delivered, opened, clicked and the rest) count the first event of that kind for each email that falls inside the range, so an email opened five times adds one to opened.

Needs an API key with read access.
Query parameters
start_datestringoptional

First day, YYYY-MM-DD (UTC). Defaults to six days before end_date, so the default range is the last 7 days.

end_datestringoptional

Last day, YYYY-MM-DD (UTC), included. Defaults to today. A range can span at most 92 days.

dimensionsstringoptional

Comma-separated: period (one row per day), domain, campaign. broadcast is read as campaign. Omit for a single totals row.

domain_idstringoptional

Only count email sent from these domains. Comma-separated ids.

campaign_idstringoptional

Only count email from these campaigns. Comma-separated ids. broadcast_id is accepted too and adds to the same list.

const res = await fetch('https://www.senddart.com/api/emails/metrics?start_date=2026-11-01&end_date=2026-11-07&dimensions=period', {
  method: 'GET',
  headers: { 'Authorization': 'Bearer mb_xxxxxxxxx' },
});
const data = await res.json();
console.log(data);

Response

{
  "object": "list",
  "start_date": "2026-11-01",
  "end_date": "2026-11-07",
  "dimensions": ["period"],
  "data": [
    {
      "period": "2026-11-01",
      "sent": 1840,
      "delivered": 1822,
      "delivery_delayed": 4,
      "opened": 911,
      "clicked": 203,
      "bounced": 11,
      "complained": 1,
      "failed": 2
    }
  ]
}

Each row carries only the keys for the dimensions you asked for (period, domain_id, campaign_id). Rows are sorted by period. A day with no mail has no row when you split by period. A malformed date, a start_date after end_date, a range longer than 92 days or an unknown dimension returns 422 validation_error.