SMSTunnel for Healthchecks.io
Missed cron jobs and backups, by text from your own phone
When a job stops checking in
When a cron job, a backup or a script misses its ping or reports a failure, Healthchecks hands the alert to your SMSTunnel account and your own Android phone texts it to you from your own number. When the job pings again, a second text says it's back.
1. Get your key
- 1. Install the SMSTunnel app from Google Play on your Android phone and sign in.
- 2. In your dashboard, open Apps → Add an app, pick Script or server, name it (for example "Healthchecks") and click Create the key.
- 3. Copy the key right away: it's shown only once. You can stop or delete the app there anytime, and Healthchecks can't send texts anymore.
Get the steps with your key in them
It opens Add an app with Script or server picked. Once the key is made, the dashboard shows every step and command with the key already filled in, ready to copy.
2. Add a Webhook integration
In your Healthchecks project, open Integrations → Add Integration → Webhook. Give it a Name (for example "SMS to me") and fill in both parts:
Execute when a check goes down
- URL
-
https://smstunnel.io/api/v1/sms/send - Method
- POST
- Request Body
-
{"to": "+14155550123", "message": "$NAME is DOWN (Healthchecks)"} - Request Headers
- the two lines below
Content-Type: application/json
X-API-Key: sk_live_... Execute when a check goes up
- URL
-
https://smstunnel.io/api/v1/sms/send - Method
- POST
- Request Body
-
{"to": "+14155550123", "message": "$NAME is back up"} - Request Headers
- the same two lines
-
Put your number in
to, with+and the country code. Keep theContent-Typeline: Healthchecks doesn't send one of its own. - Click Save Integration, tick it on the checks that should text you, and use Test! next to the integration to get a test text.
What the texts look like
Nightly backup is DOWN (Healthchecks)
Nightly backup is back up Without a key: a webhook address
A webhook address is a secret URL that turns each call into a text to the numbers you save with it, sent by your own phone from your own number. The call only sets the words, never the number, so Healthchecks needs no key.
- 1. Install the SMSTunnel app from Google Play on your Android phone and sign in.
- 2. In your dashboard, open Apps → Webhooks, click New webhook and pick Healthchecks. That fills in the name. Leave Text of the message empty, so the words come from each call.
- 3. Add the numbers that should get the texts, with
+and the country code: up to 10, and each one gets its own text. Then click Create the webhook. - 4. Copy the address, which looks like
https://smstunnel.io/api/v1/webhook/<token>. Keep it secret, like a password: whoever has it can text these numbers from your phone, though never any other number.
Get the steps with your address in them
It opens New webhook with Healthchecks picked. Once the webhook is made, the dashboard shows its address and the Healthchecks steps with the address already in them, ready to copy, and Send a test, which texts the webhook's numbers.
- Calls an hour: 20 unless you set another number, up to 500. The limit counts calls, not texts: each call texts every number of the webhook, and a test from the dashboard counts too. Past the limit, calls are refused until the hour is over, so a storm of alerts can't use up your texts.
- You can copy the address again anytime, under Address and setup. If it gets out, New address in the webhook's menu replaces it, and the old one stops working at once.
-
A
GETwith?message=…or aPOSTwith JSON sets the words: itsmessage,text,titleorbodyfield. Texts are cut at 480 characters. -
Or with the API, for scripts:
POST /api/v1/webhookswith your sign-in token, as the webhooks guide shows.
Then, in Healthchecks
In your Healthchecks project, open Integrations → Add Integration → Webhook. Each part
needs only a GET URL, the address with the words after it, and no body and no headers. Healthchecks
URL-encodes $NAME there, so any check name works:
- Execute when a check goes down
- GET, with the URL
https://smstunnel.io/api/v1/webhook/<token>?message=$NAME+is+DOWN - Execute when a check goes up
- GET, with the URL
https://smstunnel.io/api/v1/webhook/<token>?message=$NAME+is+back+up
Click Save Integration, tick it on the checks that should text you, and click Test! next to it to get a text.
Nightly backup is DOWN
Nightly backup is back up Worth knowing
- No double quotes in check names when you use the API URL: Healthchecks pastes
$NAMEinto the body as it is. ($NAME_JSONis the name already quoted for JSON, if you want only the name in the text.) - Several people? One webhook address texts up to 10 numbers, each its own text. With a key, one Webhook integration per number, all ticked on the check: SMSTunnel sends one text to one number per request.
- Set Period and Grace Time on each check, so a slow night doesn't send a false alarm. Healthchecks retries a failed call up to 2 more times.
- Phone offline? The text waits and goes out as soon as the phone is back.
If it doesn't work
-
On the Integrations page, a failed call shows as Failed next to the
integration; hover it to see why, for example
Received status code 401. -
401"Invalid or expired API key": the key is wrong or was deleted. "API key is required. Use X-API-Key header.": the key isn't in anX-API-Keyheader. SMSTunnel reads the key only from that header: Bearer or Basic authentication won't work. -
403withPERMISSION_REQUIRED: the key may not send texts. Make a new one under Apps → Add an app. -
400"property … should not exist": the body has a field SMSTunnel doesn't know. Send onlytoandmessage(and, if you need them,deviceIdanddefaultCountryCode). "message must be shorter than or equal to 1600 characters": shorten the text. "Phone number must contain…": put the number in international format, like+14155550123. -
400with "to must be a string" and "message must be a string": the body didn't arrive as JSON. Add the headerContent-Type: application/json. -
404"Cannot GET /api/v1/sms/send": the tool sent a GET. Choose POST. -
404"Webhook not found or disabled": the address is wrong, was replaced with New address, or the webhook is stopped or deleted. Copy it again from Apps → Webhooks → Address and setup. -
400"Could not build a message from the payload": the call had no words in it. Add?message=…to a GET, or amessagefield to the JSON. With a text of the message, check that the names between braces are the call's. -
429: too many texts at once. SMSTunnel takes 30 send requests a minute. Wait a minute and try again. -
429"Rate limit reached for this webhook (20/hour)": the webhook took all its calls for this hour. Wait, or raise Calls an hour (up to 500) with Edit in Apps → Webhooks. It counts calls, not texts: each call texts every number of the webhook. - In Apps → Webhooks, the webhook's row shows when it was last used and, if its last call sent no text, why.
- No text, but no error? If your phone is offline, the text waits and goes out as soon as the phone is back online. Open the SMSTunnel app on the phone to check it's linked.
Build it with an AI assistant
Copy this prompt into Claude, ChatGPT, Cursor or Copilot and replace the part in [brackets]. Don't paste your API key into the chat: the prompt doesn't need it.
Help me get Healthchecks.io alerts (missed cron jobs, failed backups) as text messages from my own phone, with SMSTunnel.
About SMSTunnel (https://smstunnel.io): my own apps and tools hand text messages (SMS) to my SMSTunnel account, and my own Android phone sends them from my own number, on my own SIM and plan. The phone runs the SMSTunnel app from Google Play (https://play.google.com/store/apps/details?id=io.smstunnel.app), signed in to my account.
What I want: [describe what should send a text, to whom, and when]
How it works:
- No plugin: Healthchecks' Webhook integration (Integrations → Add Integration → Webhook) calls SMSTunnel's API, once when a check goes down and once when it goes up. Works on healthchecks.io and self-hosted.
- "Execute when a check goes down": URL https://smstunnel.io/api/v1/sms/send, method POST, Request Body {"to": "+14155550123", "message": "$NAME is DOWN (Healthchecks)"}, Request Headers (one "Header-Name: value" per line):
Content-Type: application/json
X-API-Key: sk_live_...
- "Execute when a check goes up": the same with Request Body {"to": "+14155550123", "message": "$NAME is back up"}.
- Healthchecks sends no Content-Type of its own, so that header is needed. Placeholders: $NAME, $STATUS, $NOW, $TAGS, $SLUG, $CODE; $NAME is pasted into the body as it is, so check names must not contain double quotes ($NAME_JSON is the name already quoted for JSON).
- Without a key, through a webhook address made in my dashboard with Healthchecks picked: "Execute when a check goes down" GET https://smstunnel.io/api/v1/webhook/<token>?message=$NAME+is+DOWN (Healthchecks URL-encodes $NAME in URLs), and "up" GET https://smstunnel.io/api/v1/webhook/<token>?message=$NAME+is+back+up; no body, no headers. The webhook texts up to 10 numbers saved with it, and its text of the message stays empty so the words come from ?message=.
- Without a key: an SMSTunnel webhook address, https://smstunnel.io/api/v1/webhook/<token>. I make it in my dashboard (https://dashboard.smstunnel.io): Apps → Webhooks → New webhook, pick the tool that will call it (Grafana, Uptime Kuma, Healthchecks, Gatus, Alertmanager, Odoo Online, or Something else), add 1 to 10 numbers (each gets its own text), optionally a text of the message that pulls fields out of the JSON with {{path}}, like {{alarm.name}}, then Create the webhook and copy the address. A GET with ?message=… or a POST with JSON (its message, text, title or body field) texts those numbers; the call never sets the number. Texts are cut at 480 characters. "Calls an hour" (20 unless I set another number, up to 500) counts calls, not texts: each call texts every number, and calls past it are refused until the hour is over. The address can be copied again under Address and setup; New address replaces it if it leaks. Scripts can make one with POST https://smstunnel.io/api/v1/webhooks and my sign-in token instead.
- One recipient per request: SMSTunnel sends one text to one number. For several people, one request (or one notification) per number. In Healthchecks, one Webhook integration per number, all attached to the check.
- Healthchecks retries a failed webhook up to 2 more times and gives up after 30 seconds per call; the body can be up to 1000 characters.
- Answers: 200 {"success": true, "messageId": "…"}; 401 wrong or deleted key; 403 the key lacks a permission ("code": "PERMISSION_REQUIRED"); 400 a missing, unknown or too long field; 429 too many requests (30 sends a minute, with Retry-After): wait and retry; without Retry-After, the plan's limit for the day or month is reached. If my phone is offline the text waits and goes out when it is back, within 3 days.
- The API key comes from my SMSTunnel dashboard (https://dashboard.smstunnel.io): Apps → Add an app → Create the key. It is shown only once and can send texts and check whether they went out.
Rules for your answer:
- Do not ask for my SMSTunnel password or API key and do not put a real key in your answer; I will not paste it in this chat.
- Phone numbers must be in international format (+ and the country code).
- Help me test it with my own number first.
- Only send texts people expect from me. No unsolicited texts.
- Help me set the Period and Grace Time so a slow job does not send a false alarm. Responsible use
Built for alerts to yourself and your team, and texts people expect from you. One text goes to one number. Sending unsolicited messages from a consumer SIM generally breaches mobile carrier terms of service.
Healthchecks.io is a service and open-source project by Pēteris Caune. SMSTunnel is a third-party integration and is not affiliated with, endorsed by, or sponsored by Healthchecks.io.