SMSTunnel for UniFi Alarm Manager

Network and Protect alarms, by text from your own phone

Built into UniFi Network 9.3+ and Protect · no plugin
Alarm Manager › Webhook › Custom Webhook
UniFi Alarm Manager help

An alarm you can't miss

When an alarm fires (a person at the door after hours, a water leak sensor, the internet going down), UniFi calls a secret SMSTunnel URL and your own Android phone texts the alarm's name to you from your own number. No key goes into UniFi: the URL itself decides who gets the text.

1. Make your 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 UniFi needs no key.

  1. 1. Install the SMSTunnel app from Google Play on your Android phone and sign in.
  2. 2. In your dashboard, open Apps → Webhooks, click New webhook and pick Something else. Name it, for example "UniFi alarms".
  3. 3. Add the numbers that should get the texts, with + and the country code: up to 10, and each one gets its own text. In Text of the message, write UniFi: {{alarm.name}}. Then click Create the webhook.
  4. 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 Something else picked. Once the webhook is made, the dashboard shows its address, ready to copy, and Send a test, which texts the webhook's numbers.

That text of the message makes each text the alarm's name, taken from the JSON UniFi sends, like UniFi: Water leak in the basement.

  • 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.
  • The text of the message picks the words out of each call. Texts are cut at 480 characters.
  • Or with the API, for scripts: POST /api/v1/webhooks with your sign-in token, as the webhooks guide shows.

2. Add the webhook to an alarm

  1. 1. In UniFi Network or Protect, click Alarm Manager in the sidebar, then Create Alarm (or open one).
  2. 2. Pick the Trigger and the Scope, and name the alarm the way the text should read.
  3. 3. In Actions, add Webhook, choose Custom Webhook and paste your webhook's address:
    https://smstunnel.io/api/v1/webhook/<token>
  4. 4. In Advanced Settings, choose HTTP POST, so UniFi sends the alarm's details. Turn on Ignore Repeated Actions, then save.

UniFi has no test button for webhooks: try it with a trigger you can cause yourself, like a device of yours going offline.

What the texts look like

UniFi: Water leak in the basement
UniFi: Person at the back door after 11 PM
UniFi: Internet down at the shop

Or: fixed words in the URL

Leave the alarm on UniFi's default GET and put the words in the URL, with + between words. Make this webhook with its Text of the message left empty, and one webhook per message:

https://smstunnel.io/api/v1/webhook/<token>?message=Water+leak+in+the+basement

Worth knowing

  • Pick alarms that deserve a text. Use specific scopes and schedules (for example after hours only), and Ignore Repeated Actions. The webhook takes 20 calls an hour unless you raise its Calls an hour (Edit, in Apps → Webhooks).
  • Several people? Save up to 10 numbers with the webhook: each gets its own text.
  • Phone offline? The text waits and goes out as soon as the phone is back.

If it doesn't work

  • 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 a message field 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 UniFi Alarm Manager alarms (UniFi Network or Protect) 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:
- UniFi's Webhook action sends a GET, or a POST with UniFi's own fixed JSON ({"alarm": {"name": …, "triggers": […]}, "timestamp": …}); it can't send SMSTunnel's key or body, so it uses an SMSTunnel webhook address.
- Make the webhook in my dashboard with Something else picked and its text of the message set to "UniFi: {{alarm.name}}", so the text is the alarm's name.
- 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.
- Alarm Manager (UniFi Network 9.3+, UniFi Protect): Create Alarm → Trigger → Scope → Action: Webhook → Custom Webhook → the webhook address; Advanced Settings: HTTP POST. Name each alarm the way the text should read.
- Or, per alarm, a GET with the words in the URL: https://smstunnel.io/api/v1/webhook/<token>?message=Water+leak+in+the+basement (a separate webhook per message, with its text of the message left empty).
- "Ignore Repeated Actions" keeps a busy trigger from sending a text every few seconds.
- One recipient per request: SMSTunnel sends one text to one number. For several people, one request (or one notification) per number. The webhook address texts each number saved with it (up to 10).

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 choose triggers and scopes that deserve a text (a person after hours, a water leak, the internet going down), not every motion event.

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.

UniFi is a trademark of Ubiquiti Inc. SMSTunnel is a third-party integration and is not affiliated with, endorsed by, or sponsored by Ubiquiti Inc..

No phone paired yet?

Install the Android app and sign in with your account, and you're ready in about a minute.

Get it on Google Play