webpush-api

A simple service for sending web push notifications to subscribers.

API

GET /api/vapid

Response

{ "status": "success", "key": "..." }

GET /api/status

Response

{ "status": "...", "jobs": [...] ... }

POST /api/topic/:topic

Response

{ "status": "success", "subscriptions": [] }

DELETE /api/topic/:topic

Response

{ "status": "success" }

POST /api/topic/:topic/subscribe

Request Body

{ "subscription": { "endpoint": "...", "keys": { "p256dh": "...", "auth": "..." } } }

Response

{ "status": "success", "id": "..." }

POST /api/topic/:topic/push

Request Body

{ "title": "...", "body": "...", "icon": "...", "scheduled": "...RFC 3339..." }
  • Optional fields: icon, scheduled, ttl, urgency

Response

{ "status": "success", "id": "...uuid..." }