PushRouter API

v1.0

A unified interface for WebPush, Telegram, Discord, and Webhook notifications.

Global JSON Response
{
  "success": true,
  "message": "ok",
  "data": {...}
}
{
  "success": false,
  "error": "Description of error"
}
POST

/create-topic

Used to reserve a topic name with a password. Public topics are created automatically upon subscription.

FieldRequiredTypeDescription
topicYesStringUnique name (max 100 chars).
passwordYesStringPassword required for future POST requests.
curl -X POST https://pushrouter.com/create-topic \
  -H "Content-Type: application/json" \
  -d '{"topic":"secure-alerts","password":"supersecret"}'
POST

/send or /{topic}

Broadcast a message to all connected browsers, bots, and webhooks.

ParameterRequiredDefaultDescription
topicYes-Path can be topic or topic:password.
passwordNonullRequired for protected topics (header X-Topic-Password allowed).
titleNo"Notification"The headline of the alert.
messageYes"..."Main body content.
imageNonullURL for large banner image (Android/Desktop).
urlNonullAction to trigger on click.
colorNo#2196f3Hex color for embeds/webhooks.
urgencyNonormalvery-low | low | normal | high
ttlNonullTime-to-live (seconds).
silentNofalseSet to 1/true to silence alert sound.
action1TitleNonullFirst action button title.
action1UrlNonullFirst action button URL.
action2TitleNonullSecond action button title.
action2UrlNonullSecond action button URL.
Send Examples
# Send with actions
curl -X POST https://pushrouter.com/send \
  -d "topic=deploy" -d "title=Deploy Success" -d "message=Version 1.2 is live" \
  -d "action1Title=View Status" -d "action1Url=https://example.com"

# Protected topic (password in path)
curl -X POST https://pushrouter.com/secure-alerts:supersecret -d "message=CPU 99%"

# GET style style
curl "https://pushrouter.com/alerts?title=Ping&message=Hello"

Rate limit: 60 sends per IP per minute.

GET

/history/{topic}/{limit?}

Fetch recent logs for a topic. Limit defaults to 20 (max 100).

Path ParamTypeDescription
topicRequiredTopic name.
limitOptional1–100, default 20.
Example
curl "https://pushrouter.com/history/alerts/20"
Response fields
{
  "success": true,
  "message": "History loaded.",
  "data": [
    {
      "title": "Deploy complete",
      "message": "Version 1.2 live",
      "image": "https://example.com/banner.png",
      "click_url": "https://status.example.com",
      "action1_title": "Open",
      "action1_url": "https://status.example.com",
      "action2_title": null,
      "action2_url": null,
      "success_count": 10,
      "failure_count": 0,
      "created_at": "2026-01-10 12:00:00"
    }
  ]
}

Bot Commands

Unified command interface for Telegram and Discord.

Discord

Use Slash commands natively. Simply type / in your chat bar and the Discord UI will guide you through all available parameters.

Telegram

Provide Required arguments first in order, then append Optional ones at the end using the key=value format.

/subscribe— Subscribe to a topic
TELEGRAM SYNTAX
/subscribe [topic]
OptionRequiredDescription
topic Yes Topic name
/unsubscribe— Unsubscribe from a topic
TELEGRAM SYNTAX
/unsubscribe [topic]
OptionRequiredDescription
topic Yes Topic name
/subscriptions— List your topics
TELEGRAM SYNTAX
/subscriptions
/push— Send a notification to a topic
TELEGRAM SYNTAX
/push [topic] [message] title=... url=... image=... a1t=... a1u=... a2t=... a2u=... password=...
OptionRequiredDescription
topic Yes Topic name
message Yes Message body
title No Optional title
url No Click URL
image No Image URL
a1t No Action1 title
a1u No Action1 URL
a2t No Action2 title
a2u No Action2 URL
password No Topic password if protected
/history— Show recent notifications for a topic
TELEGRAM SYNTAX
/history [topic]
OptionRequiredDescription
topic Yes Topic name
/add_webhook— Add a Discord webhook for a topic
TELEGRAM SYNTAX
/add_webhook [webhook_url] [topic]
OptionRequiredDescription
webhook_url Yes Discord webhook URL
topic Yes Topic name
/webhooks— List your webhooks
TELEGRAM SYNTAX
/webhooks
/delete_webhook— Delete a webhook by index
TELEGRAM SYNTAX
/delete_webhook [index]
OptionRequiredDescription
index Yes Index from /webhooks
/create_topic— Create a topic (password required)
TELEGRAM SYNTAX
/create_topic [topic] [password]
OptionRequiredDescription
topic Yes Topic name
password Yes Password (required)
/topics— List topics you created
TELEGRAM SYNTAX
/topics

Webhook Example Payload

Full fan-out data sent to your registered endpoints:

{
  "topic": "deploy",
  "title": "Deploy complete",
  "description": "Version 1.2 live",
  "timestamp": "2026-01-10T12:00:00Z",
  "color": "#2196f3",
  "image": "https://example.com/banner.png",
  "url": "https://status.example.com",
  "action1_title": "Open",
  "action1_url": "https://status.example.com",
  "action2_title": null,
  "action2_url": null,
  "webhook_owner": "123456",
  "webhook_owner_platform": "discord"
}