https://api.notifyaim.com/api/v1/
All endpoints require HTTPS.
Sends a notification to a specific device, topic, or segment.
POST /notification/send
Request Body
{
"vapid_private": "Your_Vapid_Private_Key", // Your Vapid Private Key
"title": "Hello from Notify Aim",
"body": "This is a test notification",
"icon": "https://example.com/icon.png",
"topic" : "offers", // Optional topic to target
"url": "https://example.com",
"webhook" : "https://example.com/webhook", // Optional webhook for delivery status
}
{
"status": "queued",
'message': 'Notification job queued',
"job_id": "5678", // Unique job ID for tracking
}
Retrieve the status of a previously sent notification using its job ID.
GET /notification/{jobId}/progress
{
"id": "5678", // Job ID
"status": "delivered|failed|pending",
"sent": 150,
"failed": 5,
"total" : 165,
"remaining": 10,
"progress": 90, // Percentage completed
}
Sends a notification to a specific device using its subscription details.
POST /notifications/send-to-user
Request Body
{
"vapid_private": "Your_Vapid_Private_Key", // Your Vapid Private Key
"userid" : "abcd1234", // User ID to target
"endpoint": "https://fcm.googleapis.com/fcm/send/...", // User's subscription endpoint
"title": "Hello from Notify Aim",
"body": "This is a test notification",
"icon": "https://example.com/icon.png",
"url": "https://example.com",
"webhook" : "https://example.com/webhook", // Optional webhook for delivery status
}
{
"status": "sent", // "sent" or "failed"
"message": "Notification sent successfully"
}
All errors follow the structure:
{
"status": "error",
"message": "Description of the error"
}
Common HTTP Status Codes