One API call. Every Telegram chat that needs to know.
MessageRelay sends your alerts, reports and files to Telegram groups, channels and people. Bot tokens stay locked away, and each app gets a key that can only reach the chats you allow.
{
"destinations": [
"ops-alerts",
"on-call-dana",
"launch-news"
],
"text": "Checkout errors above 2%"
}
- ops-alerts QueuedSent
- on-call-dana QueuedSent
- launch-news QueuedSent
From bot token to first message in four steps
Add your bot
Paste the token from @BotFather. We check it with Telegram, encrypt it, and never show it again.
Pick the chats
Add the bot to groups, or have people send it /start. The chats it sees appear on the bot's page, and one bot can serve as many as you like.
Issue a key per app
Tick the chats each key may post to and set an expiry. Revoke a key in one click.
Send
Text, photos, video, documents and audio up to 50 MB. We queue, retry, and stay inside Telegram's rate limits.
Keys only reach the chats you choose
Your monitoring tool can page on-call. Your website can post launch news. Neither can do the other's job. If a key leaks, it can't post anywhere you didn't allow, and you can see when and from where each key was last used.
| Key | ops-alerts | on-call-dana | launch-news |
|---|---|---|---|
| grafana-prod | Allowed | Allowed | Blocked |
| ci-pipeline | Allowed | Blocked | Blocked |
| marketing-site | Blocked | Blocked | Allowed |
Delivery you don't have to babysit
- Retries
- Network errors and Telegram outages are retried with backoff. Permanent errors stop immediately and say why.
- Rate limits
- Sends are paced per bot and per chat, so busy alerts don't get your bot throttled.
- Group upgrades
- When Telegram turns a group into a supergroup and changes its ID, the destination follows automatically.
- No double posts
- Send an Idempotency-Key and a retried request returns the original message instead of posting twice.
- Per-chat status
- Every message shows sent, queued or failed for each destination, in the dashboard and the API.
- Files once
- A file sent to ten chats is uploaded to Telegram once per bot, then reused.
A small API
Send JSON for text or a link to media, or a multipart form to upload a file. Destinations are the aliases you named in the dashboard.
# Text to two chats curl -X POST https://your-relay/api/v1/messages \ -H "Authorization: Bearer mr_…" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: deploy-4812" \ -d '{"destinations":["ops-alerts","on-call-dana"], "text":"<b>Deploy 4812</b> finished", "parse_mode":"HTML"}' # Upload a file curl -X POST https://your-relay/api/v1/messages \ -H "Authorization: Bearer mr_…" \ -F destinations=ops-alerts \ -F text="Nightly report" -F [email protected]
# 202 Accepted
{
"id": "7c1e…",
"status": "queued",
"deliveries": [
{"destination": "ops-alerts", "status": "queued"},
{"destination": "on-call-dana", "status": "queued"}
],
"status_url": "…/api/v1/messages/7c1e…"
}
Locked down by default
Telegram bot tokens are master keys to your bots. MessageRelay is built so they never leave the server, and nobody gets in without two factors.
- Every sign-in needs an emailed code and an authenticator app, with backup codes for a lost phone.
- New accounts wait for an admin to approve them, unless a teammate invited them.
- Bot tokens and authenticator secrets are encrypted at rest. API keys are stored only as hashes.
- Workspaces keep teams apart, with owner, editor and viewer roles.
- An audit log records sign-ins, approvals and every change to bots, chats and keys.
Wire up your first bot
Sign in with your email. If you were invited, you're straight in; otherwise an admin approves your account.
Sign in or request access