GuideLab API

Register push subscription

Register a new Web Push subscription for the current user. If the endpoint already exists, it will be updated with the new keys. Requires user authentication.

POST
/push-subscriptions

Register a new Web Push subscription for the current user. If the endpoint already exists, it will be updated with the new keys. Requires user authentication.

Authorization

__Secure-guidelab-prod.session_token<token>

Production session cookie set for the guidelab.co domain by Better Auth

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/push-subscriptions" \  -H "Content-Type: application/json" \  -d '{    "endpoint": "http://example.com",    "keys": {      "p256dh": "string",      "auth": "string"    }  }'
{  "success": true}
Empty
Empty
Empty