Heartbeat

The push URL a cron job or scheduled task calls to report that it ran.

A heartbeat monitor is passive: instead of upzero polling a target, your job pushes to upzero when it runs. Create a heartbeat monitor from the console or CLI first; creating it generates a token that becomes part of the push URL.

POST <UPZERO_API_URL>/api/v1/heartbeat/{token}

Call this at the end of a successful run, with no body and no required headers:

curl -X POST <UPZERO_API_URL>/api/v1/heartbeat/<token>

The token is the credential. Anyone who has it can report a heartbeat for that monitor, so treat it like a secret in your job's configuration, the same way you would an ingestion token.

Optionally scope it to your organization

If you also send an X-API-Key header with a key carrying heartbeats:write (see Authentication), the request is rejected with 403 unless the key belongs to the same organization as the monitor. Without that header, the token alone is accepted, matching the behavior above.

What happens on a miss

upzero does not call your job or detect a "miss" from this endpoint directly. A heartbeat monitor's status comes from whether a push landed inside its configured window; missing that window is what turns the monitor down and, depending on your rules, opens an issue. See the Monitors and Issues sections for how a heartbeat's window and grace period are configured.

Errors

StatusMeaning
404The token does not match an active heartbeat monitor
403An X-API-Key was sent, but it belongs to a different organization than the monitor
502upzero could not record the push internally; retry

On this page