SubEtha docs
SubEtha is a hosted pub/sub relay. You publish a message to a topic, and every device subscribed to that topic gets it over whatever path works: a WebSocket, a phone push, a webhook, email, Slack, SMS, a phone call, an MCP agent, or a Reticulum mesh. Publishers never need to know who is listening or how they're reached.
It speaks ntfy's wire protocol, so this works:
#!/usr/bin/env bash
# Publish a message: the body is the message text.
set -euo pipefail
SUBETHA_URL="${SUBETHA_URL:-https://subetha.us}"
curl -sS -H "Authorization: Bearer $SUBETHA_TOKEN" \
-d "Backup done" \
"$SUBETHA_URL/@me/backups"Where to start
| If you want to… | Read |
|---|---|
| Send your first message in two minutes | Getting started |
| Understand topics, devices, endpoints, routing, and who pays | Concepts |
| Publish with headers, JSON, signatures, E2EE, attachments, retries, or dry runs | Publishing |
| Receive as JSON, SSE, raw text, WebSocket, or by polling | Subscribing |
| Deliver to push, email, Slack, SMS, voice, webhooks, or LXMF | Transports |
| Know what it costs and how the balance works | Pricing & billing |
| Hand out safe credentials and set topic rules | Tokens & policies |
| Enroll phones, Pis, browsers, and CLIs as devices | Devices |
| Use the SDKs (TypeScript, Python, Swift, Kotlin, Dart, React Native, Rust core), the CLI, or web components | SDKs & CLI |
| Connect an AI agent | Agents (MCP, llms.txt) |
| Run locally, or bridge your own transport | Self-hosting & gateways |
| Look up a route, header, or error code | API reference |
Principles
- Topics, not addresses. Devices only know topic names (and optionally keys).
- The relay picks the route. Transport selection, fallback, escalation, retries, and dedupe happen in the relay and the SDKs.
- The owner stays in control. Allow-lists, spend caps, rate limits, quiet hours, and a per-message trace showing the route and its cost.
- No surprises on the bill. Every action is prepaid and checked against your balance before it
runs.
X-Dry-Run: 1tells you the price first.
Every code sample in these docs is a real file under
docs/samples/ and runs in CI, so the
snippets you copy are known to work.