Send iPhone push notifications with a single curl command
Send a push notification to your iPhone with one curl command. Copy, paste, get the alert in under a minute. No SDKs, just an API key.
You want a notification on your phone when something happens on your machine. A long build finishes. A backup script fails. A scraper hits a captcha at 3am. You do not want to install an SDK, sign up for a third service, or wire up email. You want one command.
This post shows you the smallest possible push notification: a single curl call that lights up your iPhone in under a second.
What you need
- The TheNotificationApp iOS app installed (Free plan covers this — no card)
- An app key from the app's Apps screen
curlon your machine (already on macOS, Linux, Windows 10+)
The free tier gives you 3 apps and 100 lifetime notifications, which is plenty to wire this up and test it. If you end up using it for real monitoring, Pro is $2.99/month with 1,000 notifications.
The one-line curl command
Copy this, swap in your key, and run it:
curl -X POST https://thenotification.app/api/sendNotification \
-H "app_key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Hello from curl","body":"This came from my terminal."}'Hit enter. Your phone buzzes. That's the entire integration.
You get a JSON response back:
{
"success": true,
"message": "Notification sent to 1 device(s)",
"devices_sent": 1,
"failed_count": 0
}What's in the request
Three things, nothing more:
- Endpoint:
POST https://thenotification.app/api/sendNotification - Header
app_key: your API key — this is the only auth - JSON body with
titleandbody(required), plus optionallinkandimage
No OAuth dance. No JWT. No SDK install. The full request format is in the API reference.
Add a tap link
Most of the time you want the notification to open something — a dashboard, a PR, a log file URL. Add link:
curl -X POST https://thenotification.app/api/sendNotification \
-H "app_key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title":"Build failed",
"body":"main #4821 — TypeScript error in api/users.ts",
"link":"https://github.com/your-org/your-repo/actions/runs/4821"
}'Tap the notification and you land on the run page. This is the difference between an alert that nags you and one that's actually useful.
Add an image
Want a screenshot, chart, or logo in the notification? Pass an image URL:
curl -X POST https://thenotification.app/api/sendNotification \
-H "app_key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title":"Daily traffic snapshot",
"body":"23,481 visitors yesterday (+8%)",
"image":"https://your-grafana.example.com/render/d-solo/traffic.png"
}'The image has to be a publicly reachable URL (the iPhone fetches it directly).
Wrap it as a shell function
Typing the full curl every time is annoying. Drop this into your ~/.zshrc or ~/.bashrc:
notify() {
curl -s -X POST https://thenotification.app/api/sendNotification \
-H "app_key: $TNA_KEY" \
-H "Content-Type: application/json" \
-d "{\"title\":\"$1\",\"body\":\"${2:-done}\"}" > /dev/null
}Export your key once (export TNA_KEY="xxx"), reload your shell, and now any command becomes notifiable:
notify "Build done" "deployed to staging"Useful one-liner patterns
A few patterns that turn this into actual monitoring.
Ping yourself when a long command finishes
./run-tests.sh; notify "Tests done" "exit code $?"Run the long thing, walk away, come back when your phone buzzes.
Alert from a cron job
# /etc/cron.d/backup
0 3 * * * /usr/local/bin/backup.sh || curl -s -X POST https://thenotification.app/api/sendNotification \
-H "app_key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"title":"Backup FAILED","body":"Check /var/log/backup.log"}'The || means it only fires if the backup script exits non-zero. Silent unless something breaks — exactly what you want from cron.
Hook it into a CI failure
# .github/workflows/deploy.yml
- name: Notify on failure
if: failure()
run: |
curl -X POST https://thenotification.app/api/sendNotification \
-H "app_key: ${{ secrets.TNA_KEY }}" \
-H "Content-Type: application/json" \
-d "{\"title\":\"Deploy failed\",\"body\":\"$GITHUB_REPOSITORY $GITHUB_SHA\"}"Troubleshooting
401 / no notification arrives: double-check the app_key header value. Each app you create in TheNotificationApp has its own key — make sure you're using the one tied to the device that should receive the alert.
"Lifetime message limit exceeded": you've hit the free tier's 100-notification cap. Upgrade or create a new app for testing.
Curl prints the JSON response and your terminal looks noisy: add -s (silent) and -o /dev/null to suppress output in scripts.
Where to go from here
You now have a working push pipeline in one HTTP call. From here you can:
- Move the same request into a Python script if you prefer language bindings — same endpoint, same fields
- Read the curl docs for the full request reference
- Hook into webhooks from services like Stripe, GitHub, or Grafana with the static webhook endpoint
If this saves you from one bad 3am surprise, it's already worth the five minutes of setup. Grab an app key on TheNotificationApp and send your first curl notification.
Stop babysitting your scripts.
Free to download. Free tier available. Swiss-hosted, private by design.