V1MeWeb pushSubscriptions
Register this browser for notifications and record push consent
One transaction: registers the browser as a notification device (same ownership proof and transfer rules as /me/push-devices) and turns push on for the listed categories, with consent recorded now. 503 web_push_unavailable while sending is off.
Authorization
bearer AuthorizationBearer <token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/me/web-push/subscriptions" \ -H "Content-Type: application/json" \ -d '{ "installationId": "7a1bf939-4d70-4439-9ced-a3dbbce12bd7", "installationSecret": "string", "subscription": { "endpoint": "string", "keys": { "p256dh": "string", "auth": "string" } }, "consentPush": true, "enableCategories": [ "community" ] }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "consentAt": "2019-08-24T14:15:22Z"}Whether browser notifications can be turned on, and this account's browsers GET
enabled is false (and publicKey null) while the server cannot send; the page then hides its opt-in and never prompts. Endpoints and keys are never returned.
Stop notifications on one of your browsers POST
Leaves the account's category choices unchanged; they apply to all of your devices.