StatusPage / Monitoring API
A Heartbeat monitor is passive: instead of TrustComponent reaching out to your system, your system pings us on a schedule. If no ping arrives within the monitor’s interval plus its grace period, the monitor goes down and your alert rules fire. This is ideal for cron jobs, background workers, and backup scripts. Create a Heartbeat monitor first — see Services & Monitors.
Send a heartbeat
Section titled “Send a heartbeat”Ping with either GET or POST (no body). Two authentication styles are supported.
With a per-heartbeat token in the URL — no header needed, ideal for curl in a cron line:
curl "https://api.trustcomponent.com/monitoring/v1/heartbeats/{serviceId}/{monitorId}/{token}"With a Project API key (bearer token) instead:
curl -X POST "https://api.trustcomponent.com/monitoring/v1/heartbeats/{serviceId}/{monitorId}" \ -H "Authorization: Bearer ak_your_key_here"| Parameter | Description |
|---|---|
serviceId | UUID of the service (shown in the dashboard) |
monitorId | UUID of the heartbeat monitor |
token | The monitor’s secret token, prefixed hbt_ — shown on the monitor page |
Responses (no request body is needed; success is always 204):
| Status | Meaning |
|---|---|
204 No Content | Ping registered |
401 | Authorization header missing (API-key variant) |
403 | Invalid API key or invalid heartbeat token |
402 | Project is locked |
404 | Service or heartbeat monitor not found, or the key doesn’t own this monitor |
Behavior details:
- A ping from a down state flips the monitor back to Operational immediately — recovery doesn’t wait for the next evaluation cycle.
- The token can be rotated on the monitor page if it leaks; the old token stops working immediately.
- Example cron line: append the ping to the job itself, so it only fires on success:
30 2 * * * /usr/local/bin/backup.sh && curl -fsS "https://api.trustcomponent.com/monitoring/v1/heartbeats/{serviceId}/{monitorId}/{token}" > /dev/nullAcknowledge an alert
Section titled “Acknowledge an alert”Alert emails include a one-click acknowledgement link that stops further escalation steps and repeats for the current firing cycle — no sign-in required. The same endpoint works from scripts:
curl -X POST "https://api.trustcomponent.com/monitoring/v1/alerts/acknowledge/{token}"| Status | Meaning |
|---|---|
204 No Content | Acknowledged — idempotent, also succeeds if the cycle already ended |
400 | Invalid acknowledgement token |
The token is signed and bound to its firing cycle: a stale link can never silence a later outage. See Alerts & Escalation.