You can send push notifications in two ways: through the user-friendly admin dashboard, or programmatically via the REST API.
Sending from the Dashboard
- Log in to your AlertMagnet admin dashboard.
- Click New Campaign.
- Enter your Title, Message Body, and Destination URL.
- Click Send Now (or schedule for later).
Using POST /api/v1/send
To trigger notifications automatically from your server, CMS, or blog when new content is published, send an HTTP POST request:
curl -X POST "https://push.yourdomain.com/api/v1/send" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "New Blog Post Published!",
"body": "Read our latest engineering update.",
"target_url": "https://yourdomain.com/blog/latest"
}'