Push

Register a browser Web Push subscription

Persists the browser's PushSubscription object so the dispatcher can deliver notifications on monitor state transitions. The p256dh and auth fields are write-only secrets used server-side to encrypt push payloads — they are NEVER returned in the response. The 64 KB body limit and the global per-account 200/min rate limiter both apply. Per-account cap is enforced atomically: an account holds exactly 20 active subscriptions at steady state — concurrent subscribes never produce a 21st row. The 21st insert evicts the oldest by created_at (FIFO). The endpoint must be an https:// URL with a public hostname; private/loopback/link-local/mDNS endpoints are rejected with 400 {"error":"endpoint must be HTTPS"} (SSRF hardening).

post/api/v1/push/subscribe

Request

  • Base URL: https://api.uptimemonitoring.com
  • URL: https://api.uptimemonitoring.com/api/v1/push/subscribe
  • Auth: HTTP bearer

Request body

endpointstring uri required

Push service endpoint URL from the browser's PushSubscription. Must be HTTPS with a non-empty host.

p256dhstring required

Base64url-encoded P-256 ECDH public key from the browser. Write-only — never returned in any response.

authstring required

Base64url-encoded auth secret from the browser, used server-side to encrypt push payloads. Write-only — never returned in any response.

user_agentstring nullable

Optional client UA string for operator-facing UI.

Example request

{
  "endpoint": "https://fcm.googleapis.com/fcm/send/abcd1234"
}

Response

Subscription stored.

idinteger
endpointstring uri
user_agentstring nullable
created_atstring date-time

Changes

No recorded changes to this operation across all 1 revision of this API.