notifications

Subscribe a device to push notifications [write]

Changed on

From a browser, send what its pushManager.subscribe() returned. From the phone app, send { kind: "expo", token } with the device token Expo issued. Subscribing the same device again keeps one subscription. Answers 403 not_enabled where push is not turned on, 400 for an endpoint that is not a browser push service's or a token that is not Expo's, and 503 not_migrated until the platform's push tables are in place.

post/push-subscriptions

Request

  • Base URL
    https://api.agentsky.dev/v1
  • URL
    https://api.agentsky.dev/v1/push-subscriptions
  • Auth
    HTTP bearer

Request body

endpointstring

A browser push service's address. With keys.

kind'expo'

expo, for the phone app. With token.

tokenstring

The device token Expo issued to this phone.

Response

Created

Changes