Developers
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.

POST
/v1/me/web-push/subscriptions
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"}