EnderDash

Subscribe Push

POST
/pwa/subscribePush

Authorization

better-auth.session_token<token>

Signed-in EnderDash browser session cookie.

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

deviceName*string
Length1 <= length <= 120
subscription*
userId*string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/pwa/subscribePush" \  -H "Content-Type: application/json" \  -d '{    "deviceName": "string",    "subscription": {      "endpoint": "http://example.com",      "expirationTime": 0,      "keys": {        "auth": "string",        "p256dh": "string"      }    },    "userId": "string"  }'
null