headless lms

Register this device for push notifications, or refresh it

POST /api/member/devices. Register this device for push notifications, or refresh it. Headless LMS Notifications API reference.

POST
/api/member/devices

For anyone signed in to the organization. Call it after sign-in and on every launch. A new token adds a device, a known token is refreshed, and a token another person registered moves to you. A browser sends its push subscription endpoint as token with its keys; an iOS app sends its bundle id as appId and its APNs environment. 422 when the provider is not configured, an apns appId is not one of the configured bundle ids, a webpush device has no keys, or keys or environment come with a provider they do not apply to.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/member/devices" \  -H "Content-Type: application/json" \  -d '{    "provider": "apns",    "token": "string"  }'
{  "id": "string",  "provider": "apns",  "token": "string",  "p256dh": "string",  "auth": "string",  "appId": "string",  "environment": "production"}
{  "error": "string",  "message": "string",  "requestId": "string",  "issues": [    {      "path": "string",      "message": "string"    }  ]}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string",  "issues": [    {      "path": "string",      "message": "string"    }  ]}
{  "error": "string",  "message": "string",  "requestId": "string"}