API
Heartbeats
One public POST per monitor. No auth header — the token in the path is the credential.
HTTP
POST /api/heartbeat/{token}
Content-Type: application/json (optional)Empty body still counts
A POST with no body records a ping and moves the monitor to Up. JSON is optional. Use it when you want duration, counts, or other scalars on the monitor page.
cURL
curl -fsS -X POST https://gonewatch.com/api/heartbeat/YOUR_TOKENResponse
| Status | Body | When |
|---|---|---|
| 200 | { "ok": true, "status": "up" } | Ping recorded |
| 200 | { "ok": true, "status": "paused" } | Monitor disabled — not recorded |
| 404 | { "error": "Monitor not found" } | Unknown token |
If you send Content-Type: application/json, the 200 body also includes a payload object with stored (what we kept) and, when something was dropped, ignored keys and reasons. The ping still succeeds.
Paused monitors
A disabled monitor returns 200 with
status: "paused" and does not insert a heartbeat. Jobs can keep POSTing during maintenance without moving the schedule.GitHub Action
Store the full URL as GONEWATCH_URL. Install gonewatch/heartbeat@v1 from the GitHub Marketplace. The Action does not send JSON yet — see the GitHub Action docs.
.github/workflows/nightly.yml
- name: Gonewatch heartbeat
if: success()
uses: gonewatch/heartbeat@v1
with:
url: ${{ secrets.GONEWATCH_URL }}