Skip to content

MailerGetStats

GET mailer/email/stats

Aggregated report over a date range: how many emails, and what happened to them — delivered, bounced, complained, opened, clicked.

The rates are the point. Mail providers start throttling a sender at roughly 2% bounces and 0.1% complaints, so those two numbers decide whether the domain keeps reaching inboxes at all. Test emails are excluded from the report.

Access Control

Allowed roles: admin, leader. Scoped to the brand of the caller.

Request

GET request
GET https://{broker_domain}/mailer/email/stats?from=2026-08-01&to=2026-08-24&groupBy=day
Authorization: <JWT_TOKEN>
{
  "command": "MailerGetStats",
  "extID": "1",
  "data": {
    "from": "2026-08-01",
    "to": "2026-08-24",
    "groupBy": "day"
  }
}
const res = await platform.MailerGetStats({
  from: "2026-08-01",
  to: "2026-08-24",
  groupBy: "day"
});

Request Data

Field Type Required Description
from string No YYYY-MM-DD, defaults to 7 days ago
to string No YYYY-MM-DD, defaults to today
groupBy enum No day (default), profile, status, kind, domain, or campaign
profileId int No Restrict to one provider profile
campaignId int No Restrict to one campaign

Behavior

  • Rates are computed over emails with a known outcome, so messages still in flight do not drag them down.
  • Grouping by domain shows which mailbox provider is rejecting the mail — a bounce rate that is bad only at one provider is a reputation problem with that provider, not with the content.

Response Data

A rate is null while nothing in the range has a final status yet — that is different from a zero rate.

{
  "groupBy": "day",
  "rows": [
    {
      "key": "2026-08-24",
      "emails": 420,
      "delivered": 401,
      "bounced": 8,
      "complained": 1,
      "opened": 180,
      "clicked": 42,
      "failed": 2
    }
  ],
  "totals": {
    "emails": 8420,
    "delivered": 8102,
    "bounced": 190,
    "complained": 6,
    "opened": 3410,
    "clicked": 820,
    "failed": 41
  },
  "rates": {
    "delivery": 0.9701,
    "bounce": 0.0227,
    "complaint": 0.0007,
    "open": 0.4209,
    "click": 0.1012
  }
}

Errors

Code Error Description
400 VALIDATION_ERROR Unparsable date, or from later than to