💓 Heartbeat API
Send a Heartbeat Ping
Report that your job/service is running successfully.
Endpoint
GET /heartbeat/{token}
POST /heartbeat/{token}
Parameters
| Parameter | Location | Description |
|---|---|---|
token | URL path | The unique heartbeat token (from your monitor's settings) |
Example
# GET request
curl https://your-monitron.com/heartbeat/abc123def456
# POST request
curl -X POST https://your-monitron.com/heartbeat/abc123def456
Response
{
"status": "ok",
"message": "Heartbeat recorded"
}
What Happens
- The monitor's
last_checked_atis updated to now - Status is set to Up
- Consecutive failures are reset to 0
- If there was an active incident, it's automatically resolved
Report a Heartbeat Failure
Explicitly report that your job/service has failed.
Endpoint
POST /heartbeat/{token}/fail
Parameters
| Parameter | Location | Description |
|---|---|---|
token | URL path | The unique heartbeat token |
Example
curl -X POST https://your-monitron.com/heartbeat/abc123def456/fail
Response
{
"status": "ok",
"message": "Failure recorded"
}
What Happens
- Status is set to Down
- Consecutive failures are incremented
- An incident is created (if one isn't already open)
- Notifications are dispatched to configured contacts
🔗 Finding Your Token
- Go to Monitors → click your Heartbeat monitor → View
- The Heartbeat URL is shown prominently in the monitor details
- The token is the last part of the URL:
/heartbeat/{this-part}