Title: ntfy URL Source: https://docs.ntfy.sh/ Published Time: Wed, 24 Sep 2025 02:52:16 GMT Markdown Content: Getting started[ΒΆ](https://docs.ntfy.sh/#getting-started "Permanent link") -------------------------------------------------------------------------- ntfy lets you **send push notifications to your phone or desktop via scripts from any computer**, using simple HTTP PUT or POST requests. I use it to notify myself when scripts fail, or long-running commands complete. Step 1: Get the app[ΒΆ](https://docs.ntfy.sh/#step-1-get-the-app "Permanent link") --------------------------------------------------------------------------------- [![Image 1](https://docs.ntfy.sh/static/img/badge-googleplay.png)](https://play.google.com/store/apps/details?id=io.heckel.ntfy)[![Image 2](https://docs.ntfy.sh/static/img/badge-fdroid.png)](https://f-droid.org/en/packages/io.heckel.ntfy/)[![Image 3](https://docs.ntfy.sh/static/img/badge-appstore.png)](https://apps.apple.com/us/app/ntfy/id1625396347) To [receive notifications on your phone](https://docs.ntfy.sh/subscribe/phone/), install the app, either via Google Play, App Store or F-Droid. Once installed, open it and subscribe to a topic of your choosing. Topics don't have to explicitly be created, so just pick a name and use it later when you [publish a message](https://docs.ntfy.sh/publish/). Note that **topic names are public, so it's wise to choose something that cannot be guessed easily.** For this guide, we'll just use `mytopic` as our topic name: ![Image 4: adding a topic](https://docs.ntfy.sh/static/img/getting-started-add.png) Creating/adding your first topic That's it. After you tap "Subscribe", the app is listening for new messages on that topic. Step 2: Send a message[ΒΆ](https://docs.ntfy.sh/#step-2-send-a-message "Permanent link") --------------------------------------------------------------------------------------- Now let's [send a message](https://docs.ntfy.sh/publish/) to our topic. It's easy in every language, since we're just using HTTP PUT/POST, or with the [ntfy CLI](https://docs.ntfy.sh/install/). The message is in the request body. Here's an example showing how to publish a simple message using a POST request: Command line (curl) ntfy CLI HTTP JavaScript Go Python PHP ``` curl -d "Backup successful πŸ˜€" ntfy.sh/mytopic ``` ``` ntfy publish mytopic "Backup successful πŸ˜€" ``` ``` POST /mytopic HTTP/1.1 Host: ntfy.sh Backup successful πŸ˜€ ``` ``` fetch('https://ntfy.sh/mytopic', { method: 'POST', // PUT works too body: 'Backup successful πŸ˜€' }) ``` ``` http.Post("https://ntfy.sh/mytopic", "text/plain", strings.NewReader("Backup successful πŸ˜€")) ``` ``` requests.post("https://ntfy.sh/mytopic", data="Backup successful πŸ˜€".encode(encoding='utf-8')) ``` ``` file_get_contents('https://ntfy.sh/mytopic', false, stream_context_create([ 'http' => [ 'method' => 'POST', // PUT also works 'header' => 'Content-Type: text/plain', 'content' => 'Backup successful πŸ˜€' ] ])); ``` This will create a notification that looks like this: ![Image 5: basic notification](https://docs.ntfy.sh/static/img/android-screenshot-basic-notification.png) Android notification That's it. You're all set. Go play and read the rest of the docs. I highly recommend reading at least the page on [publishing messages](https://docs.ntfy.sh/publish/), as well as the detailed page on the [Android/iOS app](https://docs.ntfy.sh/subscribe/phone/). Here's another video showing the entire process: Sending push notifications to your Android phone