API Documentation

Complete guide to using Push Notifications API

Quick Start

curl -X POST https://push_api.bigopenbox.co.uk/push \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "topic",
    "target": "all_users",
    "title": "Hello World",
    "body": "Your first notification!"
  }'

Authentication

All API requests require an API key in the header:

X-API-Key: your-api-key

Endpoints

POST /push

Send a push notification

{
  "type": "topic|token",
  "target": "topic_name or device_token",
  "title": "Notification title",
  "body": "Notification body",
  "priority": "high|normal|low",
  "scheduled_for": "2024-12-31T23:59:59Z"
}

POST /push/bulk

Send multiple notifications (max 1000)

{
  "notifications": [
    {"type": "topic", "target": "news", "title": "...", "body": "..."},
    {"type": "token", "target": "device_token", "title": "...", "body": "..."}
  ]
}

GET /push/{id}

Get notification status

DELETE /push/{id}

Cancel pending notification

POST /devices/register

Register a device

{
  "device_token": "fcm_token",
  "user_id": "user123",
  "platform": "android|ios",
  "device_model": "Pixel 7",
  "os_version": "13"
}

GET /stats

Get notification statistics

GET /analytics/delivery

Get delivery analytics by platform

Response Codes

Code Description
200Success
400Bad Request
401Unauthorized
429Rate Limit Exceeded
500Server Error

Rate Limits

  • Standard endpoints: 10 requests/second
  • Bulk endpoint: 2 requests/second
  • Per-app limits based on your plan

SDKs & Libraries

JavaScript

npm install @pushapi/client

Python

pip install pushapi

Go

go get pushapi.com/sdk