Send a push notification to your phone with curl
One curl command sends a notification to your Android phone: text, a title, a priority and a link. No SDK, no API key, no account token: the channel's address is the only setting.
From any terminal, script or server
The whole API is one POST
Install anypush on your Android phone, make a channel and copy its address. Then POST to it. The body is the message; headers add a title, a priority and a link to open when you tap it. The answer is 202 with the message's id.
- Headers
- Title, Priority (low, normal or high; ntfy's min, default, max, urgent and 1 to 5 work too) and Click. X-Title, X-Priority and X-Url are the same.
- JSON
- message (required), title, priority, url.
- Limits
- A message up to 4,096 characters, a title up to 256, 64 KiB a request, 60 requests a minute per channel.
- Retries
- Send an Idempotency-Key header and a retry within 24 hours sends once.
curl -d "Disk at 91% on nas" https://anypush.app/h/your-token HTTP/2 202 {"duplicate":false,"id":729,"status_url":"https://anypush.app/h/your-token/messages/729"}
curl -H "Title: nas" \
-H "Priority: high" \
-H "Click: https://nas.local:5001" \
-d "Disk at 91%" \
https://anypush.app/h/your-token HTTP/2 202 {"duplicate":false,"id":730,"status_url":"https://anypush.app/h/your-token/messages/730"}
curl -H "Content-Type: application/json" \
-d '{"title":"nas","message":"Disk at 91%","priority":"high","url":"https://nas.local:5001"}' \
https://anypush.app/h/your-token HTTP/2 202 {"duplicate":false,"id":731,"status_url":"https://anypush.app/h/your-token/messages/731"}
#!/bin/bash
# 0 is a silent heartbeat, anything else an alert with the body as its text
./deploy.sh 2>&1 | tail -n 20 > /tmp/deploy.log
curl --data-binary @/tmp/deploy.log "https://anypush.app/h/your-token/${PIPESTATUS[0]}" {"duplicate":false,"id":749}
Coming from ntfy?
The headers above are ntfy's names, so a curl line written for ntfy mostly needs only the address changed. A channel's address is private by default: nobody can subscribe to it, and only someone who has the address can send to it. Tools with an ntfy option, such as Uptime Kuma, Healthchecks.io and borgmatic, can use a channel's address as their ntfy server. Attachments, action buttons and an iPhone app are things ntfy has and anypush does not.
Tested on 26 November 2026
Each command above ran against a live channel on 26 November 2026; each answer is the real one, with the address shortened to your-token. The text example arrived as a normal notification without a title. The headers and the JSON examples each arrived as a high-priority "nas" notification that opens https://nas.local:5001 when tapped. The bash example ran after a script that exited 4, and arrived as "Exited with status 4" with the script's last lines as the text.
Questions
Do I need an API key?
No. The channel's address is the key: anyone who has it can send to your phone, so keep it in an environment variable or a secret, not in code you share. If it leaks, the app gives the channel a new address and the old one stops working at once.
Does it work with wget, PowerShell or Python?
Yes. Anything that can make an HTTP POST works. In PowerShell: Invoke-RestMethod -Method Post -Uri $url -Body 'Disk at 91%'. The app shows recipes with your own address filled in.
What does the 202 mean?
That anypush kept the message and is sending it to your phone. The status_url in the answer says whether a phone has reported it.
Does it work on an iPhone?
No. anypush is an Android app, Android 7 and up.