Skip to content

Click2CallHealth

GET click2call/health

Full state of the module: database, loaded adapters with their capabilities, what the crons are doing, how many calls hang unfinished, and the counters of every rejection reason.

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 Click2CallPing.

Access Control

Allowed role: admin.

Request

GET request
GET https://{broker_domain}/click2call/health
Authorization: <JWT_TOKEN>
{
  "command": "Click2CallHealth",
  "extID": "1",
  "data": {}
}
const res = await platform.Click2CallHealth({});

Request Data

This method takes no parameters.

Response Data

callsCounters are in-memory counters since process start: they answer "why are calls not going out" without reading the log.

{
  "service": "sct-click2call",
  "nodeID": "sct-click2call-3227647",
  "version": "0.0.1",
  "uptimeSec": 412,
  "database": { "ok": true, "latencyMs": 1 },
  "adapters": {
    "loaded": ["atlant", "commpeak", "twilio", "voiso"],
    "failed": [],
    "capabilities": [
      {
        "name": "twilio",
        "title": "Twilio",
        "capabilities": { "polling": true, "webhook": true, "endCall": true, "recordings": true },
        "credentialsSchema": { "accountSid": "string", "authToken": "string", "fromNumber": "string" }
      }
    ]
  },
  "crons": {
    "enabled": true,
    "pollIntervalSec": 3,
    "pollConcurrency": 10,
    "poll": { "lastRunAt": "2026-08-24T13:39:31.004Z", "lastChecked": 2, "lastUpdated": 1, "runs": 137 },
    "stale": { "lastRunAt": "2026-08-24T13:30:00.000Z", "lastClosed": 0, "totalClosed": 4 }
  },
  "calls": {
    "pending": 1,
    "oldestPendingAt": "2026-08-24 13:32:40",
    "last24h": { "ANSWERED": 42, "NO_ANSWER": 11, "BUSY": 3 }
  },
  "callsCounters": {
    "started": 56,
    "startFailed": 2,
    "duplicatesBlocked": 1,
    "blockedByBlacklist": 3,
    "blockedByCountry": 0,
    "blockedByCallingHours": 5,
    "invalidPhone": 2,
    "failovers": 1,
    "recordingsResolved": 38
  },
  "webhooks": { "received": 120, "processed": 118, "duplicates": 2, "unverified": 0, "errors": 0 }
}

Errors

Code Error Description
401 PERMISSION_DENIED Not an admin session
502 MOL_CALL_FAILED The module is not on the bus