2021-10-23 03:26:01 +02:00
<!DOCTYPE html>
< html lang = "en" >
< head >
2021-10-24 20:22:53 +02:00
< meta charset = "UTF-8" >
2021-12-05 21:57:37 +01:00
< title > ntfy.sh | Send push notifications to your phone via PUT/POST< / title >
2022-03-06 02:24:10 +01:00
< link rel = "stylesheet" href = "static/css/home.css" type = "text/css" >
2021-10-24 20:22:53 +02:00
<!-- 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 -->
2021-11-12 20:43:32 +01:00
< meta name = "theme-color" content = "#317f6f" >
< meta name = "msapplication-navbutton-color" content = "#317f6f" >
< meta name = "apple-mobile-web-app-status-bar-style" content = "#317f6f" >
2021-10-24 20:22:53 +02:00
<!-- 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" / >
2022-03-11 16:43:18 +01:00
< meta property = "og:title" content = "ntfy.sh | Push notifications to your phone or desktop via PUT/POST" / >
2021-10-24 20:22:53 +02:00
< 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." / >
2021-10-31 04:46:08 +01:00
< meta property = "og:image" content = "/static/img/ntfy.png" / >
2021-10-24 20:22:53 +02:00
< meta property = "og:url" content = "https://ntfy.sh" / >
2022-03-06 03:15:40 +01:00
<!-- Fonts -->
< link rel = "stylesheet" href = "static/css/fonts.css" type = "text/css" >
2021-10-23 03:26:01 +02:00
< / head >
< body >
2021-12-05 02:23:29 +01:00
< nav id = "header" >
< div id = "headerBox" >
< img id = "logo" src = "static/img/ntfy.png" alt = "logo" / >
2021-12-05 21:57:37 +01:00
< div id = "name" > ntfy< / div >
2021-12-05 02:23:29 +01:00
< ol >
2022-03-06 02:24:10 +01:00
< li > < a href = "app" > Web app< / a > < / li >
2021-12-05 02:23:29 +01:00
< li > < a href = "docs/subscribe/phone/" > Android/iOS< / a > < / li >
2022-03-11 16:43:18 +01:00
< li > < a href = "docs/" > Docs< / a > < / li >
2021-12-05 02:23:29 +01:00
< li > < a href = "docs/publish/" > API< / a > < / li >
2021-12-05 21:57:37 +01:00
< li > < a href = "https://github.com/binwiederhier/ntfy" > GitHub< / a > < / li >
2021-12-05 02:23:29 +01:00
< / ol >
< / div >
< / nav >
2022-03-05 20:48:42 +01:00
< div id = "main" >
2021-12-05 02:23:29 +01:00
< h1 > Send push notifications to your phone or desktop via PUT/POST< / h1 >
2021-10-24 03:29:45 +02:00
< p >
2021-11-24 02:22:09 +01:00
< b > ntfy< / b > (pronounce: < i > notify< / i > ) is a simple HTTP-based < a href = "https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern" > pub-sub< / a > notification service.
It allows you to send notifications to your phone or desktop via scripts from any computer,
entirely < b > without signup, cost or setup< / b > . It's also < a href = "https://github.com/binwiederhier/ntfy" > open source< / a > if you want to run your own.
2021-10-24 03:29:45 +02:00
< / p >
2021-11-09 16:46:47 +01:00
< div id = "screenshots" >
< a href = "static/img/screenshot-curl.png" > < img src = "static/img/screenshot-curl.png" / > < / a >
< a href = "static/img/screenshot-web-detail.png" > < img src = "static/img/screenshot-web-detail.png" / > < / a >
< span class = "nowrap" >
< a href = "static/img/screenshot-phone-main.jpg" > < img src = "static/img/screenshot-phone-main.jpg" / > < / a >
< a href = "static/img/screenshot-phone-detail.jpg" > < img src = "static/img/screenshot-phone-detail.jpg" / > < / a >
< a href = "static/img/screenshot-phone-notification.jpg" > < img src = "static/img/screenshot-phone-notification.jpg" / > < / a >
< / span >
< / div >
2021-10-23 03:26:01 +02:00
2021-11-18 02:50:47 +01:00
< h2 id = "publish" class = "anchor" > Publishing messages< / h2 >
2021-10-24 03:29:45 +02:00
< p >
2021-12-05 21:57:37 +01:00
< a href = "docs/publish/" > Publishing messages< / a > can be done via PUT or POST. Topics are created on the fly by subscribing or publishing to them.
2021-10-29 19:58:14 +02:00
Because there is no sign-up, < b > the topic is essentially a password< / b > , so pick something that's not easily guessable.
< / p >
< p class = "smallMarginBottom" >
2021-11-24 02:22:09 +01:00
Here's an example showing how to publish a message using a POST request (via < tt > curl -d< / tt > ):
2021-10-29 19:58:14 +02:00
< / p >
< code >
2021-11-22 14:30:09 +01:00
curl -d "Backup successful 😀" < span class = "ntfyUrl" > ntfy.sh< / span > /mytopic
2021-11-18 19:14:55 +01:00
< / code >
2021-11-27 22:12:08 +01:00
< p class = "smallMarginBottom" >
2021-12-05 13:31:05 +01:00
There are < a href = "docs/publish/" > more features< / a > related to publishing messages: You can set a
2021-12-05 21:57:37 +01:00
< a href = "docs/publish/#message-priority" > notification priority< / a > , a < a href = "docs/publish/#message-title" > title< / a > ,
and < a href = "docs/publish/#tags-emojis" > tag messages< / a > .
2021-12-09 16:23:17 +01:00
Here's an example using some of them together:
2021-11-27 22:12:08 +01:00
< / p >
< code >
curl \< br / >
-H "Title: Unauthorized access detected" \< br / >
-H "Priority: urgent" \< br / >
2021-11-29 15:34:43 +01:00
-H "Tags: warning,skull" \< br / >
2021-11-27 22:12:08 +01:00
-d "Remote access to $(hostname) detected. Act right away." \< br / >
< span class = "ntfyUrl" > ntfy.sh< / span > /mytopic
< / code >
2021-12-05 21:57:37 +01:00
< p >
Here's what that looks like in the < a href = "docs/subscribe/phone/" > Android app< / a > :
< / p >
< figure >
2022-03-06 02:24:10 +01:00
< img src = "static/img/screenshot-phone-popover.png" style = "max-height: 200px" / >
2021-12-05 21:57:37 +01:00
< figcaption > Urgent notification with pop-over< / figcaption >
< / figure >
2021-10-29 19:58:14 +02:00
2021-11-18 02:50:47 +01:00
< h2 id = "subscribe" class = "anchor" > Subscribe to a topic< / h2 >
2021-10-24 04:49:50 +02:00
< p >
2021-12-05 02:23:29 +01:00
You can create and subscribe to a topic either < a href = "docs/subscribe/phone/" > using your phone< / a > ,
in < a href = "docs/subscribe/web/" > this web UI< / a > , or in your own app by < a href = "docs/subscribe/api/" > subscribing via the API< / a > .
2021-10-24 03:29:45 +02:00
< / p >
2021-10-23 03:26:01 +02:00
2021-12-05 13:31:05 +01:00
< h3 id = "subscribe-phone" class = "anchor" > Subscribe from your phone< / h3 >
< p >
Simply get the app and start < a href = "docs/publish/" > publishing messages< / a > . To learn more about the app,
< a href = "docs/subscribe/phone/" > check out the documentation< / a > .
< / p >
< p >
< a href = "https://play.google.com/store/apps/details?id=io.heckel.ntfy" > < img src = "static/img/badge-googleplay.png" > < / a >
< a href = "https://f-droid.org/en/packages/io.heckel.ntfy/" > < img src = "static/img/badge-fdroid.png" > < / a >
< a href = "https://github.com/binwiederhier/ntfy/issues/4" > < img src = "static/img/badge-appstore.png" > < / a >
< / p >
2021-12-05 21:57:37 +01:00
< p >
Here's a video showing the app in action:
< / p >
2021-12-05 13:31:05 +01:00
< figure >
2021-12-05 21:57:37 +01:00
< video controls muted autoplay loop src = "static/img/android-video-overview.mp4" style = "max-width: 650px" > < / video >
2021-12-05 13:31:05 +01:00
< figcaption > Sending push notifications to your Android phone< / figcaption >
< / figure >
2022-03-05 20:48:42 +01:00
< h3 id = "subscribe-web" class = "anchor" > Subscribe via web app< / h3 >
< p >
2022-03-11 16:43:18 +01:00
Subscribe to topics in the < a href = "app" > web app< / a > and receive messages as < b > desktop notification< / b > .
It is available at < b > < a href = "app" > < span class = "ntfyUrl" > ntfy.sh< / span > /app< / a > < / b > .
2022-03-05 20:48:42 +01:00
< / p >
2022-03-11 16:43:18 +01:00
< figure >
< a href = "app" > < img src = "static/img/screenshot-web-detail.png" width = "100%" / > < / a >
< figcaption > ntfy web app, available at < a href = "app" > < span class = "ntfyUrl" > ntfy.sh< / span > /app< / a > < / figcaption >
< / figure >
2021-10-24 03:29:45 +02:00
2021-12-05 13:31:05 +01:00
< h3 id = "subscribe-api" class = "anchor" > Subscribe using the API< / h3 >
2021-11-01 21:39:40 +01:00
< p >
2021-12-05 13:31:05 +01:00
There's a super simple API that you can use to integrate your own app. You can consume
a < a href = "docs/subscribe/api/#subscribe-as-json-stream" > JSON stream< / a > ,
2022-03-11 16:43:18 +01:00
an < a href = "docs/subscribe/api/#subscribe-as-sse-stream" > SSE/EventSource stream< / a > ,
a < a href = "docs/subscribe/api/#subscribe-as-raw-stream" > plain text stream< / a > ,
or < a href = "docs/subscribe/api/#websockets" > via WebSockets< / a > .
2021-11-18 15:22:33 +01:00
< / p >
2021-10-27 20:56:17 +02:00
< p class = "smallMarginBottom" >
2021-12-05 21:57:37 +01:00
Here's an example for JSON. The < b > connection stays open< / b > , so you can retrieve messages as they come in:
2021-10-29 19:58:14 +02:00
< / p >
< code >
2021-11-22 14:30:09 +01:00
$ curl -s < span class = "ntfyUrl" > ntfy.sh< / span > /mytopic/json< br / >
2021-10-29 19:58:14 +02:00
{"id":"SLiKI64DOt","time":1635528757,"event":"open","topic":"mytopic"}< br / >
{"id":"hwQ2YpKdmg","time":1635528741,"event":"message","topic":"mytopic","message":"Hi!"}< br / >
2021-12-05 13:31:05 +01:00
{"id":"DGUDShMCsc","time":1635528787,"event":"keepalive","topic":"mytopic"}< br / >
...
2021-10-27 20:56:17 +02:00
< / code >
2021-12-05 13:31:05 +01:00
< p >
2021-12-05 21:57:37 +01:00
Here's a short video demonstrating it in action:
2021-12-05 13:31:05 +01:00
< / p >
2021-12-05 21:57:37 +01:00
< figure >
< video controls muted autoplay loop src = "static/img/android-video-subscribe-api.mp4" style = "max-width: 650px" > < / video >
< figcaption > Subscribing to the JSON stream with < tt > curl< / tt > < / figcaption >
< / figure >
2021-12-05 13:31:05 +01:00
2021-12-05 21:57:37 +01:00
< h3 id = "docs" class = "anchor" > Check out the docs!< / h3 >
2021-12-05 13:31:05 +01:00
< p >
2021-12-05 21:57:37 +01:00
ntfy has so many more features and you can learn about all of them < a href = "docs/" > in the documentation< / a >
2021-12-05 13:31:05 +01:00
(I tried my very best to make it the best docs ever 😉, not sure if I succeeded, hehe).
< / p >
2021-12-05 21:57:37 +01:00
< figure >
< a href = "docs/" > < img width = "100%" src = "static/img/screenshot-docs.png" / > < / a >
< figcaption > Check out the documentation< / figcaption >
< / figure >
2021-12-05 13:31:05 +01:00
2021-12-05 21:57:37 +01:00
< h3 id = "free-software" class = "anchor" > 100% open source & forever free< / h3 >
2021-12-05 13:31:05 +01:00
< p >
I love free software, and I'm doing this because it's fun. I have no bad intentions, and I will
2021-12-05 21:57:37 +01:00
never monetize or sell your information. This service will always stay
< a href = "https://github.com/binwiederhier/ntfy" > free and open< / a > .
You can read more in the < a href = "docs/faq/" > FAQs< / a > and in the < a href = "docs/privacy/" > privacy policy< / a > .
2021-10-27 20:56:17 +02:00
< / p >
2021-10-24 04:49:50 +02:00
2021-10-25 04:08:06 +02:00
< center id = "ironicCenterTagDontFreakOut" > < i > Made with ❤️ by < a href = "https://heckel.io" > Philipp C. Heckel< / a > < / i > < / center >
2021-10-24 03:29:45 +02:00
< / div >
2021-11-09 16:46:47 +01:00
< div id = "lightbox" class = "lightbox" > < / div >
2022-03-06 02:24:10 +01:00
< script src = "static/js/home.js" > < / script >
2021-10-23 03:26:01 +02:00
< / body >
< / html >