Documentation Index
Fetch the complete documentation index at: https://docs.larm.dev/llms.txt
Use this file to discover all available pages before exploring further.
Heartbeat monitor token, found in monitor settings
Heartbeat monitors work by expecting a periodic ping. If the ping stops arriving within the configured interval, Larm marks the monitor as down and fires alerts.
Endpoint
ANY https://app.larm.dev/api/heartbeat/{token}
Accepts any HTTP method (GET, POST, HEAD, etc.). The token is found in your heartbeat monitor’s settings in the dashboard.
No Authorization header is needed. The token in the URL is the authentication.
Responses
{
"status": "ok",
"state": "up"
}
| Status | Description |
|---|
| 200 | Ping received. state is one of pending, up, down, or stale. |
| 404 | Token doesn’t match any heartbeat monitor. |
| 429 | Rate limited — maximum 6 pings per minute per token. |
Examples
Cron job
Ping after your job completes. If the job fails or hangs, the ping never arrives and Larm alerts you.
# Add to the end of your crontab entry
0 * * * * /usr/local/bin/backup.sh && curl -sf https://app.larm.dev/api/heartbeat/YOUR_TOKEN
curl
curl https://app.larm.dev/api/heartbeat/YOUR_TOKEN
Python
import requests
requests.get("https://app.larm.dev/api/heartbeat/YOUR_TOKEN")
Node.js
fetch("https://app.larm.dev/api/heartbeat/YOUR_TOKEN");
Ruby
require "net/http"
Net::HTTP.get(URI("https://app.larm.dev/api/heartbeat/YOUR_TOKEN"))