Skip to Content
Docs
APIπŸ§ͺ REST EndpointsNotifications

POST /api/push/subscriptions

POST
/api/push/subscriptions

Save this browser's Web Push subscription (the browser's PushSubscription JSON) for the caller. The endpoint must be https on a known push service. Saving a known endpoint moves it to the caller. 503 when Web Push is not configured.

Not available to personal access tokens; call it from a signed-in session.

Authorization

bearer
headerAuthorizationBearer <token>

A session token or a personal access token. Leave it empty when the instance runs without authentication (AUTH_TYPE unset).

Request Body

application/json
  1. body
endpoint*string

The push service URL (https, a known push service)

expirationTime?

Ignored

keys*

{p256dh, auth}, base64url, as the browser gives them

Response Body

Success

Example Request
curl -X POST 'http://localhost:7091/api/push/subscriptions' \  -H 'Content-Type: application/json' \  -d '{  "endpoint": "string",  "keys": {}}'
Example Response200
Empty