MailerHealth¶
GET mailer/health
Full state of the module: database, loaded adapters, what the crons are doing, how deep the queue is, the bounce and complaint rates per profile, the last known provider quotas, and the counters of triggers, campaigns and webhooks.
The per-profile rates are the part to look at first: they are what the reputation guard uses to pause a profile, and seeing them next to the queue backlog explains why sending slowed down.
triggers.byEvent answers one question the other counters cannot: did a platform event
reach the module at all. Every subscribed event is listed there from the moment the
subscription is made, with seen: 0, so an event that never arrived is a zero in the
list rather than a missing line. subscribedAt is when the module started listening,
lastAt when it last received one, and an event whose trigger was removed stays in the
list with subscribed: false so its history is not lost. Each arrival is also written to
the log as [triggers] event '<name>' received with the event id and brand — never with
the recipient, which is personal data. Together these tell a platform-side problem from a
module-side one: a subscribed event with seen: 0 after the action that should raise
it means the platform did not publish it.
Access Control¶
Allowed role: admin.
Request¶
GET https://{broker_domain}/mailer/health
Authorization: <JWT_TOKEN>
{
"command": "MailerHealth",
"extID": "1",
"data": {}
}
const res = await platform.MailerHealth({});
Request Data¶
This method takes no parameters.
Response Data¶
queue.awaitingReport counts emails in SENT — accepted by the provider but with no delivery event yet. A number that keeps growing means the webhook stopped arriving, which MailerPing cannot tell you.
{
"service": "sct-mailer",
"nodeID": "sct-mailer-3227647",
"version": "0.0.1",
"uptimeSec": 412,
"database": { "ok": true, "latencyMs": 1 },
"adapters": {
"loaded": ["postmark", "sendgrid", "ses", "smtp"],
"failed": [],
"capabilities": [
{
"name": "postmark",
"title": "Postmark",
"capabilities": { "sendEmail": true, "webhook": true, "domainCheck": true, "balance": false }
}
]
},
"crons": {
"enabled": true,
"queueIntervalSec": 5,
"queue": { "lastRunAt": "2026-08-24T13:39:30.004Z", "lastTaken": 7, "lastSent": 7, "runs": 84 },
"reports": { "lastRunAt": "2026-08-24T13:39:15.114Z", "lastChecked": 7, "lastUpdated": 2 },
"campaigns": { "lastRunAt": "2026-08-24T13:39:00.000Z", "lastStarted": 1 },
"expired": { "lastRunAt": "2026-08-24T13:30:00.000Z", "lastExpired": 1, "totalExpired": 3 }
},
"queue": {
"pending": 7,
"oldestPendingAt": "2026-08-24 13:38:02",
"awaitingReport": 14,
"last24h": { "DELIVERED": 402, "SENT": 14, "PENDING": 7, "BOUNCED": 8, "COMPLAINED": 1 }
},
"deliverability": [
{ "profileId": 3, "sample": 420, "bounceRate": 0.019, "complaintRate": 0.0002, "pausedAt": null }
],
"balances": {
"4": { "provider": "ses", "amount": 48200, "currency": "EMAILS_PER_DAY", "low": false, "checkedAt": "2026-08-24T14:11:03.118Z", "error": null }
},
"suppressions": 1204,
"triggers": {
"eventsSeen": 312,
"matched": 208,
"queued": 205,
"deduped": 3,
"errors": 0,
"byEvent": {
"cashier.deposit.approved": { "seen": 208, "lastAt": "2026-08-24T14:09:51.004Z", "subscribedAt": "2026-08-24T06:00:02.117Z", "subscribed": true },
"customer.created": { "seen": 0, "lastAt": null, "subscribedAt": "2026-08-24T06:00:02.117Z", "subscribed": true }
}
},
"counters": { "emails": 8420, "suppressed": 190, "campaigns": 4 },
"webhooks": { "received": 420, "processed": 402, "duplicates": 12, "ignored": 4, "unverified": 2, "errors": 0 }
}
Errors¶
| Code | Error | Description |
|---|---|---|
401 |
PERMISSION_DENIED |
Not an admin session |
502 |
MOL_CALL_FAILED |
The module is not on the bus |