The bell that rings until someone answers.

Hansho lets any backend reach a specific person's iPhone and Apple Watch: notifications, Live Activities, widgets, and pages that ring like an alarm until someone acknowledges them.

Self-hosted hub The server your backend talks to is yours to run and to read: AGPL-3.0.

Acme Ops · Page

acme-ops.example

Checkout is down

Error rate 38% for 4 min.

Ringing. Again every 2 min until someone acknowledges.

Rings until someone acknowledges it on any device.Example. Acme Ops is a placeholder sender.

Five strike codes

Strike one.

  • PassiveLands in the inbox, no sound
  • ActiveA normal notification
  • Time-sensitiveBreaks through Focus
  • CriticalSounds even on silent
  • PageRings until someone acknowledges it on any device

In Edo, the watchman told the town how close a fire was by how he struck the bell. Hansho's five levels work the same way.

Page

A channel caps the level it delivers, so pages go to oncall, a channel created with "max_level":"page".

The request that sends it
curl
curl -X POST https://hub.example.com/api/v1/messages \
  -H "Authorization: Bearer $KEY" \
  -H 'Content-Type: application/json' \
  -d '{"external_user_id":"user-42","channel":"oncall",
       "level":"page",
       "title":"Checkout is down",
       "body":"Error rate 38% for 4 min.",
       "page":{"interval_s":120,"max_retries":5}}'

Answered, or it keeps ringing

A page goes out again every two minutes until someone acknowledges it on any of their devices. Then it goes quiet everywhere, and your backend hears who answered.

One page, start to finish

  1. 03:12:04POST /api/v1/messageslevel page, channel oncall: 202 queued
  2. 03:12:05message.deliveredthe page reached a device
  3. 03:14:05resentno answer yet, attempts: 1
  4. 03:14:31message.ackedacknowledged on Apple Watch; every device stops ringing
  • PagesRe-sent every interval_s (120 s by default). After max_retries (5) it waits one more interval, then expires and sends message.expired.
  • Any messageAdd an action with "ack": true and an ordinary notification asks for an acknowledgement too. The inbox marks it until it gets one.
  • Webhooksmessage.acked when someone acknowledges, message.dismissed when they dismiss it without acknowledging, action for any other button.
  • StatusGET /api/v1/messages/{id} says queued, delivered, paging, acked, expired or undeliverable, with the attempts so far.

How it works

Your backend talks to a hub you run. The hub encrypts each message for one device and hands it to our relay, which is the only thing allowed to push to the app.

  1. YouYour backendAny language. SDKs for Node, Go, Python, Ruby, PHP, Java, .NET and Rust, or plain HTTPS and JSON.
  2. YouHansho HubSelf-hosted, AGPL-3.0. Holds pairings, channels, templates and sounds. Encrypts every message.
  3. UsHansho RelayHolds the Apple push key. Forwards for verified hubs. Stores no message content.
  4. AppleApple PushApple Push Notification service delivers to the device.
  5. The personiPhone and WatchDecrypts, checks the hub's signature, then rings, banners or files it.

And back. Acknowledgements, dismissals and button presses travel back to the hub, which posts them to your backend as signed webhooks: message.acked, message.dismissed, action.

Your backend sends to your Hansho Hub over HTTPS. The hub signs and encrypts the message for one device and sends it to the Hansho Relay, which forwards it with the Apple push key to Apple's push service, which delivers it to the iPhone or Apple Watch. Acknowledgements and actions go back to the hub and on to your backend as webhooks.
  1. Run a hub

    Start the Hansho Hub next to your backend with Docker, register it with the relay and prove you own its domain.

  2. Pair by QR

    Your backend asks the hub for a single-use pairing ticket and shows it as a QR code. The person scans it in the app and sees your name and verified domain before approving.

  3. Send

    Call the hub with an SDK for Node, Go, Python, Ruby, PHP, Java, .NET or Rust, or plain HTTPS. Pick a channel and a level; the phone and the watch do the rest.

We hold the key, not the data

Apple only lets the holder of an app's push key reach it, so someone has to run that part. We do, and we built it to know as little as possible.

  • Self-hosted hubThe server your backend talks to is yours to run and to read: AGPL-3.0.
  • End to endAlerts are encrypted on your hub for one device and signed by it. The app decrypts on the device and blocks anything it cannot verify.
  • RelayStores no message content and logs only hub and pairing ids.
  • Verified domainA hub proves it controls its domain before the relay forwards anything, and the app shows that domain next to your name.
  • No accountsNobody signs up. Pairings sync through the person's own iCloud.

What the receiver's data looks like, in plain words

The New Sender sheet on iPhone: Acme Ops wants to send to this iPhone, verified domain ops.acme.example, what it may do, and Approve and Cancel buttons
Pairing: the sender's name and verified domain come first.

Live Activities and widgets

Not everything is an alarm. Put a deploy, an order or an incident on the lock screen and in the Dynamic Island, and keep a number on the home screen.

Illustration with placeholder data.

  • Live ActivitiesStart, update and end them from your backend. Updates go out at priority 5 or 10, with up to 4 KB of state, encrypted by default.
  • Widget feedsPUT /api/v1/feeds/{id} for one person, or for everyone paired with you. Widgets fetch their data from your hub.
  • No template neededWithout one, the app picks a layout from the data's shape: a value with min and max is a gauge, a value is a big number, items with a state are a status grid, other items are a list.

Your layout, one renderer

Register a template once and send only data. The app draws it in the expanded notification, the Live Activity and the widget. Try your own in the builder.

Template
{"type":"vstack","spacing":10,"align":"leading","children":[
  {"type":"hstack","spacing":8,"children":[
    {"type":"symbol","name":"shippingbox.fill","size":20},
    {"type":"text","text":"{{title}}","style":"headline"},
    {"type":"spacer"},
    {"type":"badge","text":"{{env}}"}]},
  {"type":"foreach","each":"items","max":5,"spacing":6,"body":
    {"type":"hstack","spacing":8,"children":[
      {"type":"text","text":"{{item.name}}"},
      {"type":"spacer"},
      {"type":"text","text":"{{item.status}}","style":"caption"}]}}]}
Open the template builder

Edit this one or start from an example, see it as a notification, a Live Activity or a widget, in light and dark.

Acme Opsnow

Deploys

prod

web 4.14.0

ok

api 2.9.1

ok

worker 1.3.0

slow

cron 0.8.2

ok

  • A small set of partsStacks, spacers, text, SF Symbols, images, progress bars, gauges, timers, badges, dividers, and foreach for lists.
  • Plain data{{placeholders}} and bindings read the message data. No expressions, no code on the device.
  • Checked on saveAt most 8 deep and 64 nodes; unknown properties are rejected with the field name.

For the person it rings for

Many of them are not technical, and they get the last word: who may reach them, on which channel, and how loudly.

On the wrist

The page that rings the phone rings the watch, and either one can answer it.

  • AcknowledgeOne tap on the watch acknowledges the page and stops it on the iPhone too.
  • InboxRecent messages and their senders, readable at a glance.
  • No setupPairings arrive through the person's iCloud, so the watch knows every sender the phone does.
A ringing page on Apple Watch: Database down, from Acme Ops with its verified domain, with an Acknowledge button
A page on the watch
The Hansho inbox on Apple Watch: the ringing page Database down from Acme Ops on top, more that needs you below
The watch inbox

Screens from a development build. Acme Ops and its domain are placeholders, not customers.

Questions

Something missing? The docs go deeper, and the source is the final word.

Do I have to run a server?

What does the relay see?

Can the relay or Apple read the messages?

Do the people I page need an account?

What happens when nobody acknowledges a page?

Can a sender make everything a page?

Which languages can send?

Which devices does the app run on?

Does this website track me?

Ten minutes to a ringing phone

Run the hub, pair your own phone, send a page, and acknowledge it from your wrist.

The app is built for iOS and watchOS; a Mac app is planned for a later version. It is in public beta: join on TestFlight.

Hanshohan·shō, the fire-watch bell