Send your first alert
This takes about two minutes and needs no account. You will send an alert to This device, the channel every installation has from the start.
1. Send a test from the app
Section titled “1. Send a test from the app”Open the Alerts page. While the inbox is empty it shows Send your first alert, with Sends to This device underneath.
- Type a message, or keep the sample.
- Pick a Priority: one of the four alert levels.
- Choose Send a test alert.
The alert appears in the inbox a moment later. If notifications are allowed, it also shows as a system notification.
2. Send from a script
Section titled “2. Send from a script”Every channel has a send URL. Posting JSON to it creates an alert. To get the one for this device:
- On the Alerts page, expand Need API or CLI access?, pick Windows or Linux/macOS, and choose Copy curl command to copy a complete command; or
- On the Channels page, open This device’s actions and choose Copy send URL.
Then send an alert:
curl -X POST "$SEND_URL" \ -H 'Content-Type: application/json' \ -d '{"alert": {"title": "Hello, Gregor", "body": "This is my first alert."}}'A 201 Created response means the alert was stored. It reaches your devices a moment later.
Next steps
Section titled “Next steps”- Learn every request field and limit in Send alerts.
- Make alerts that need a response: Acknowledgement and receipts.
- Hear when a scheduled job stops running with heartbeats.
- Send from scripts and cron jobs with the command-line tool.
- Sign in to create channels that reach all your devices or other people.