Creates and queues a push notification for immediate or scheduled delivery.
URL: /send-notification
Method: POST
Authentication: Authorization: Key <api_key>
Body (JSON):
Parameter
Type
Required
Description
body
string
Yes
The main text content. Max 255 chars.
title
string
No
The notification title. Max 100 chars.
url
string
No
The destination URL to open on click.
icon
string
No
URL to the icon image.
scheduled_at
string
No
ISO 8601 Datetime. Send immediately if omitted or in the past.
segment_id
uuid
No
Target specific subscriber segment. Overrides channel-wide sending.
target_platforms
array
No
E.g., ["web", "android"]. Defaults to ["web"].
Response (202):
{"success":true,"message":"Notification has been stored for processing. Notification ID: 987f65cc-e89b-12d3-a456-426614174000","notification_id":"987f65cc-e89b-12d3-a456-426614174000","scheduled_at":"2026-03-25T15:00:00.000Z","status":"pending"}
Examples
cURL
curl-X POST https://api.pushblitz.com/send-notification \-H"Content-Type: application/json"\-H"Authorization: Key 53cf0d9b4bXXXXXXXXXXXX"\-d'{
"title": "Spring Sale Started!",
"body": "Get up to 50% discount on all sneakers.",
"url": "https://my-sneaker-store.com/sale",
"icon": "https://my-sneaker-store.com/images/sale-icon.png",
"target_platforms": ["web", "android", "ios"]
}'
Node.js
const response =awaitfetch('https://api.pushblitz.com/send-notification',{method:'POST',headers:{'Content-Type':'application/json','Authorization':'Key 53cf0d9b4bXXXXXXXXXXXX'},body:JSON.stringify({title:'Spring Sale Started!',body:'Get up to 50% discount on all sneakers.',url:'https://my-sneaker-store.com/sale',icon:'https://my-sneaker-store.com/images/sale-icon.png',target_platforms:['web','android']})});const data =await response.json();
Cancel Notification
Cancels a scheduled notification if it has not been processed/sent yet.
URL: /cancel-notification/:notificationId
Method: DELETE
Authentication: Authorization: Key <api_key>
Response (200):
{"success":true,"message":"Notification 987f65cc-e89b-12d3-a456-426614174000 (Title: 'Spring Sale Started!') successfully cancelled.","notificationId":"987f65cc-e89b-12d3-a456-426614174000"}
const response =awaitfetch('https://api.pushblitz.com/cancel-notification/987f65cc-e89b-12d3-a456-426614174000',{method:'DELETE',headers:{'Authorization':'Key 53cf0d9b4bXXXXXXXXXXXX'}});const data =await response.json();
List Channel Notifications
Retrieves a paginated list of notifications sent or scheduled for a specific channel.
URL: /notifications/:channelId
Method: GET
Authentication: Authorization: Key <api_key>
Query Parameters:
limit (Optional): Number of results (default 50, max 100).
offset (Optional): Pagination offset (default 0).
Response (200):
[{"notification_id":"987f65cc-e89b-12d3-a456-426614174000","title":"Spring Sale Started!","body":"Get up to 50% discount on all sneakers.","icon":"https://my-sneaker-store.com/images/sale-icon.png","url":"https://my-sneaker-store.com/sale","recipient_count":1000,"delivered_count":995,"bounced_count":5,"clicked_count":120,"scheduled_at":"2026-03-25T15:00:00.000Z","created_at":"2026-03-20T10:00:00.000Z","status":"sent","target_platforms":["web","android"],"segment_id":null}]
Examples
cURL
curl-X GET "https://api.pushblitz.com/notifications/b12f45cc-e89b-12d3-a456-426614174000?limit=10&offset=0"\-H"Authorization: Key 53cf0d9b4bXXXXXXXXXXXX"
Node.js
const response =awaitfetch('https://api.pushblitz.com/notifications/b12f45cc-e89b-12d3-a456-426614174000?limit=10',{method:'GET',headers:{'Authorization':'Key 53cf0d9b4bXXXXXXXXXXXX'}});const data =await response.json();
Get Notification Statistics
Retrieves detailed statistical information and configuration for a single notification.
URL: /notification/:notificationId
Method: GET
Authentication: Authorization: Key <api_key>
Response (200):
{"notification_id":"987f65cc-e89b-12d3-a456-426614174000","title":"Spring Sale Started!","body":"Get up to 50% discount on all sneakers.","icon":"https://my-sneaker-store.com/images/sale-icon.png","url":"https://my-sneaker-store.com/sale","recipient_count":1000,"delivered_count":995,"bounced_count":5,"clicked_count":120,"channel_id":"b12f45cc-e89b-12d3-a456-426614174000","scheduled_at":"2026-03-25T15:00:00.000Z","created_at":"2026-03-20T10:00:00.000Z","status":"sent","target_platforms":["web","android"],"segment_id":null}
Examples
cURL
curl-X GET https://api.pushblitz.com/notification/987f65cc-e89b-12d3-a456-426614174000 \-H"Authorization: Key 53cf0d9b4bXXXXXXXXXXXX"
Node.js
const response =awaitfetch('https://api.pushblitz.com/notification/987f65cc-e89b-12d3-a456-426614174000',{method:'GET',headers:{'Authorization':'Key 53cf0d9b4bXXXXXXXXXXXX'}});const data =await response.json();