2021-10-23 01:26:01 +00:00
<!DOCTYPE html>
< html lang = "en" >
< head >
2021-10-24 18:22:53 +00:00
< meta charset = "UTF-8" >
< title > ntfy.sh | simple HTTP-based pub-sub< / title >
< link rel = "stylesheet" href = "static/css/app.css" type = "text/css" >
<!-- Mobile view -->
< meta name = "viewport" content = "width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge,chrome=1" >
< meta name = "HandheldFriendly" content = "true" >
<!-- Mobile browsers, background color -->
< meta name = "theme-color" content = "#004c79" >
< meta name = "msapplication-navbutton-color" content = "#004c79" >
< meta name = "apple-mobile-web-app-status-bar-style" content = "#004c79" >
<!-- Favicon, see favicon.io -->
< link rel = "icon" type = "image/png" href = "static/img/favicon.png" >
<!-- Previews in Google, Slack, WhatsApp, etc. -->
< meta property = "og:type" content = "website" / >
< meta property = "og:locale" content = "en_US" / >
< meta property = "og:site_name" content = "ntfy.sh" / >
< meta property = "og:title" content = "ntfy.sh | simple HTTP-based pub-sub" / >
< meta property = "og:description" content = "ntfy is a simple HTTP-based pub-sub notification service. It allows you to send desktop notifications via scripts from any computer, entirely without signup or cost. Made with ❤ by Philipp C. Heckel, Apache License 2.0, source at https://heckel.io/ntfy." / >
< meta property = "og:image" content = "/static/img/ntfy.png" / >
< meta property = "og:url" content = "https://ntfy.sh" / >
2021-10-23 01:26:01 +00:00
< / head >
< body >
2021-10-24 01:29:45 +00:00
< div id = "main" >
2021-10-24 02:49:50 +00:00
< h1 > ntfy.sh - simple HTTP-based pub-sub< / h1 >
2021-10-24 01:29:45 +00:00
< p >
2021-10-24 18:22:53 +00:00
< b > ntfy< / b > (pronounce: < i > notify< / i > ) is a simple HTTP-based pub-sub notification service and tool.
It allows you to send < b > desktop notifications via scripts from any computer< / b > , entirely < b > without signup or cost< / b > .
2021-10-24 03:30:10 +00:00
It's also < a href = "https://github.com/binwiederhier/ntfy" > open source< / a > if you want to run your own.
2021-10-24 01:29:45 +00:00
< / p >
2021-10-24 02:49:50 +00:00
< p id = "error" > < / p >
2021-10-23 01:26:01 +00:00
2021-10-24 02:49:50 +00:00
< h2 > Subscribe to a topic< / h2 >
2021-10-24 01:29:45 +00:00
< p >
2021-10-24 02:49:50 +00:00
Topics are created on the fly by subscribing to them. You can create and subscribe to a topic either in this web UI, or in
your own app by subscribing to an < a href = "https://developer.mozilla.org/en-US/docs/Web/API/EventSource" > EventSource< / a > ,
a JSON feed, or raw feed.
< / p >
< p >
Because there is no sign-up, < b > the topic is essentially a password< / b > , so pick something that's not easily guessable.
2021-10-24 01:29:45 +00:00
< / p >
2021-10-23 01:26:01 +00:00
2021-10-24 02:49:50 +00:00
< h3 > Subscribe via web< / h3 >
< p >
If you subscribe to a topic via this web UI in the field below, messages published to any subscribed topic
2021-10-24 03:30:10 +00:00
will show up as < b > desktop notification< / b > .
2021-10-24 02:49:50 +00:00
< / p >
2021-10-24 01:29:45 +00:00
< form id = "subscribeForm" >
< p >
2021-10-24 02:49:50 +00:00
< label for = "topicField" > Topic ID:< / label >
2021-10-24 03:30:10 +00:00
< input type = "text" id = "topicField" placeholder = "Letters, numbers, _ and -" pattern = "[-_A-Za-z]{1,64}" autofocus / >
2021-10-24 18:22:53 +00:00
< input type = "submit" id = "subscribeButton" value = "Subscribe" / >
2021-10-24 01:29:45 +00:00
< / p >
< / form >
2021-10-24 02:49:50 +00:00
< p id = "topicsHeader" > Subscribed topics:< / p >
2021-10-24 01:29:45 +00:00
< ul id = "topicsList" > < / ul >
2021-10-24 18:51:49 +00:00
< audio id = "notifySound" src = "static/sound/mixkit-long-pop-2358.wav" > < / audio >
2021-10-24 01:29:45 +00:00
2021-10-24 02:49:50 +00:00
< h3 > Subscribe via your app, or via the CLI< / h3 >
2021-10-24 18:22:53 +00:00
< code >
2021-10-24 02:49:50 +00:00
curl -s ntfy.sh/mytopic/raw # one message per line (\n are replaced with a space)< br / >
curl -s ntfy.sh/mytopic/json # one JSON message per line< br / >
curl -s ntfy.sh/mytopic/sse # server-sent events (SSE) stream
2021-10-24 18:22:53 +00:00
< / code >
2021-10-24 02:49:50 +00:00
2021-10-24 18:22:53 +00:00
< h2 > Publishing messages< / h2 >
2021-10-24 02:49:50 +00:00
< p >
Publishing messages can be done via PUT or POST using. Here's an example using < tt > curl< / tt > :
< / p >
2021-10-24 18:22:53 +00:00
< code >
2021-10-24 02:49:50 +00:00
curl -d "long process is done" ntfy.sh/mytopic
2021-10-24 18:22:53 +00:00
< / code >
2021-10-24 02:49:50 +00:00
< p >
Messages published to a non-existing topic or a topic without subscribers will not be delivered later.
There is (currently) no buffering of any kind. If you're not listening, the message won't be delivered.
< / p >
2021-10-24 01:29:45 +00:00
< / div >
2021-10-24 18:22:53 +00:00
< script src = "static/js/app.js" > < / script >
2021-10-23 01:26:01 +00:00
< / body >
< / html >