SmsHealth¶
GET sms/health
Full state of the module: database, loaded adapters with their capabilities, what the crons are doing, how deep the queue is, the last known provider balances, and the counters of triggers and webhooks.
This is the page for an operator looking into a problem, not a probe for a monitor — it runs several queries, including a 24-hour report. For frequent polling use SmsPing.
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}/sms/health
Authorization: <JWT_TOKEN>
{
"command": "SmsHealth",
"extID": "1",
"data": {}
}
const res = await platform.SmsHealth({});
Request Data¶
This method takes no parameters.
Response Data¶
queue.awaitingReport counts messages in SENT — accepted by the provider but never confirmed. A number that keeps growing means delivery reports are not arriving, which SmsPing cannot tell you.
{
"service": "sct-sms",
"nodeID": "sct-sms-3227647",
"version": "0.0.1",
"uptimeSec": 412,
"database": { "ok": true, "latencyMs": 1 },
"adapters": {
"loaded": ["infobip", "twilio", "vonage"],
"failed": [],
"capabilities": [
{
"name": "twilio",
"title": "Twilio",
"capabilities": { "polling": true, "webhook": true, "balance": true, "unicode": true },
"credentialsSchema": { "accountSid": "string", "authToken": "string", "fromNumber": "string" }
}
]
},
"crons": {
"enabled": true,
"queueIntervalSec": 5,
"queue": { "lastRunAt": "2026-08-24T13:39:30.004Z", "lastTaken": 7, "lastSent": 7, "lastFailed": 0, "runs": 84 },
"dlr": { "lastRunAt": "2026-08-24T13:39:15.114Z", "lastChecked": 7, "lastUpdated": 2, "runs": 14 },
"stuck": { "lastRunAt": "2026-08-24T13:30:00.000Z", "lastReset": 0, "totalReset": 1 },
"expired": { "lastRunAt": "2026-08-24T13:30:00.000Z", "lastExpired": 1, "totalExpired": 3 }
},
"queue": {
"pending": 7,
"oldestPendingAt": "2026-08-24 13:38:02",
"awaitingReport": 7,
"last24h": { "DELIVERED": 402, "SENT": 7, "PENDING": 7, "UNDELIVERED": 12, "FAILED": 2 }
},
"balances": {
"3": { "provider": "twilio", "amount": 42.15, "currency": "EUR", "low": false, "checkedAt": "2026-08-24T14:11:03.118Z", "error": null }
},
"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 }
}
},
"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 |