Site notification API
Authenticate an app, backend, or CMS plugin and send an idempotent web push notification.
Site notification API
Use the private API verification key from Sites → Settings as a Bearer token. Requests are scoped to the site in the URL.
curl -X POST https://pushrr.online/api/v1/sites/SITE_ID/notifications \
-H "Authorization: Bearer sk_site_REPLACE_ME" \
-H "Idempotency-Key: order-123-shipped-v1" \
-H "Content-Type: application/json" \
-d '{
"title": "Order shipped",
"body": "Your order is on its way.",
"targetUrl": "https://example.com/orders/123",
"audience": { "type": "all" }
}'Successful new requests return 202 Accepted with the campaign ID, selected delivery backend, and a status URL. Repeating the same site and Idempotency-Key returns the original campaign without sending twice.
Audience
- Omit
audience, or use{ "type": "all" }, for all active subscribers. - Use
{ "type": "segment", "segmentId": "…" }when the site's plan includes segmentation. - Use
{ "type": "subscriber", "subscriberId": "…" }for one subscriber.
Audience IDs are verified against the authenticated site. Rich images and segmented sends follow plan entitlements, and API-created campaigns count toward monthly campaign limits.
Status
Call GET /api/v1/sites/SITE_ID/notifications/CAMPAIGN_ID with the same Bearer key. The response includes current campaign and delivery progress.
Rotate a key
Rotating a site API key immediately invalidates the previous server credential. It does not rotate the public browser key, service worker, hosted subscription origin, VAPID keys, or stored subscribers.