# Healthchecks.io check down or up notifications on your phone > Get a push notification when a Healthchecks.io cron job or heartbeat misses its ping or reports a failure, and a quiet one when it recovers. - Company: Healthchecks.io (https://www.justpush.io/recipes/healthchecks) - Event: `status` (Check status) - Tags: Developer tools, Monitoring - Install: https://studio.justpush.io/recipes/healthchecks/check-status - Web page: https://www.justpush.io/recipes/healthchecks/check-status ## Setup 1. Click Install in Studio and sign in. The recipe is added to your account and you get a personal webhook URL. 2. In Healthchecks.io, open your project's Integrations and add a Webhook integration. 3. Use your webhook URL (shown in Studio after install) with method POST and the body and header from the setup notes below, for both down and up. 4. Enable the integration on the checks that should notify you, then press Test. 5. In Healthchecks.io, open your project's **Integrations โ†’ Webhook**. Fill in **both** the "goes down" and "goes up" sections the same way: 6. **URL:** the URL above, method **POST** 7. **Request headers:** `Content-Type: application/json` 8. **Request body:** 9. ```json 10. { 11. "status": "$STATUS", 12. "now": "$NOW", 13. "exitstatus": $EXITSTATUS, 14. "check": $JSON 15. } 16. ``` 17. Then enable the integration on your checks and press **Test**. `$JSON` stays valid JSON even when a check's name contains quotes. For a self-hosted Healthchecks, change `HEALTHCHECKS_URL` at the top of the code. 18. Healthchecks.io doesn't sign webhooks, so keep your endpoint URL private. ## Code Studio calls `handleRequest(request)` with the incoming webhook (`{ method, headers, body, query, raw }`) and sends the message object it returns. Returning `null` sends nothing. ```js // Healthchecks.io โ†’ check down or back up // Fires when a Healthchecks.io check misses its ping (or reports a failure) and when it // recovers, using the webhook body from INSTALL.md. // Docs: https://healthchecks.io/docs/configuring_notifications/ // Where "View check" links go; change this for a self-hosted Healthchecks. const HEALTHCHECKS_URL = "https://healthchecks.io" // "4m 12s" / "2h 5m" from a number of seconds. function duration(seconds) { const s = Math.round(Number(seconds)) if (!Number.isFinite(s) || s <= 0) return null if (s < 60) return `${s}s` if (s < 3600) return `${Math.floor(s / 60)}m ${s % 60}s` return `${Math.floor(s / 3600)}h ${Math.floor((s % 3600) / 60)}m` } // Only link to real http(s) URLs. function link(url, cta) { return typeof url === "string" && /^https?:\/\//.test(url) ? [{ cta, url }] : [] } function handleRequest(request) { const body = request.body || {} const check = body.check && typeof body.check === "object" ? body.check : {} const status = body.status ?? check.status // Guard: only the down/up webhook from INSTALL.md. if (!["down", "up"].includes(status)) { console.log(`Not a Healthchecks.io status change ("${status ?? "unknown"}") โ€” skipping`) return null } const name = check.name || body.name || "Your check" const tags = typeof check.tags === "string" && check.tags.trim() ? check.tags.trim().split(/\s+/).join(", ") : null const url = check.uuid ? `${HEALTHCHECKS_URL}/checks/${check.uuid}/details/` : null const exit = Number(body.exitstatus) if (status === "down") { const why = Number.isFinite(exit) && exit > 0 ? `Last run exited with ${exit}` : "It missed its expected ping" return { title: `๐Ÿ”ด ${name} is down`, message: why + (tags ? ` ยท ${tags}` : ""), topic: "Healthchecks.io", priority: 1, // High โ€” a job you rely on stopped reporting in buttons: link(url, "View check"), } } const took = duration(check.last_duration) return { title: `โœ… ${name} is back up`, message: (took ? `Last run took ${took}` : "It's pinging again") + (tags ? ` ยท ${tags}` : ""), topic: "Healthchecks.io", priority: -1, // Low โ€” back to normal buttons: link(url, "View check"), } } ``` ## Healthchecks.io status webhook payload (sample) ```json { "now": "2026-09-29T03:15:00+00:00", "check": { "desc": "pg_dump to B2", "name": "Nightly backup", "slug": "nightly-backup", "tags": "prod backups", "uuid": "5f1c9a44-0e3b-4e7c-9d2a-7c1e8b3f6a90", "grace": 3600, "status": "down", "methods": "", "n_pings": 412, "started": false, "ping_url": "https://hc-ping.com/5f1c9a44-0e3b-4e7c-9d2a-7c1e8b3f6a90", "last_ping": "2026-09-29T02:00:04+00:00", "next_ping": null, "last_duration": 312, "manual_resume": false }, "status": "down", "exitstatus": 1 } ``` ## FAQ ### Does this work on iPhone and Android? Yes. Install the JustPush app from the App Store or Google Play and sign in. Every phone signed in to your account gets the notification. ### Do I need to write code? No. Install the recipe in Studio, paste your webhook URL into Healthchecks.io and you are done. The code is there if you want to change the text, the sound or the buttons. ### Can I change what the notification says? Yes. After install the recipe's code is yours. Edit it in Studio and test it against the sample payload before you save. ### What does it cost? JustPush is free for 30 days. After that it's $19.99 a year, or $39.99 once. There is no extra charge for recipes.