Skip to main content

Register Support Push Subscription

POST 

/api/support/push/subscriptions

Registers a device for push notifications.

Required scope: support:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

The body is the browser's own subscription object, handed over verbatim. Subscribe through the browser's Push API — registration.pushManager.subscribe(), passing the push.vapid_public_key from GET /api/support/meta as applicationServerKey — and send the endpoint and keys off the result. None of these values are yours to invent or to build by hand: the push service issues the endpoint and the browser generates the keys.

Re-registering the same endpoint is the normal case, not an error — a browser hands back the same endpoint every time it boots. The existing device is refreshed (keys replaced, failure streak cleared, ownership moved to the signed-in caller) and the answer is 200 instead of 201.

Request body

  • endpoint (string, required) — the push service URL the browser was issued. Must start with https://, max 2000 characters
  • keys (object, required) — the key material the notification payload is encrypted with. Both keys are required together: a subscription missing either one can never be delivered to, so it is refused rather than stored and silently skipped
  • keys.p256dh (string, required) — the browser's base64url public key, max 255 characters
  • keys.auth (string, required) — the browser's base64url auth secret, max 255 characters
  • user_agent (string, optional) — a label for this device, shown when listing devices. Defaults to the request's User-Agent header, max 255 characters

Responses

  • 201 — a new device was registered
  • 200 — this endpoint was already registered and has been refreshed
  • 422 — the subscription is incomplete or malformed

This endpoint does not require tenant context — a device is registered once and covers every tenant the caller works in.

Authentication: Bearer token with the support:write scope, or an authenticated session.

Request

Responses

OK

Response Headers
    Content-Type