Push

Register this device for push notifications

Bind the Expo push token of the calling device to the authenticated user. Idempotent on the token: re-registering refreshes lastSeenAt and re-binds it to the caller, so a phone changing hands never keeps notifying its previous owner's account.

post/v1/push-tokens

Request

  • Base URL: https://api.prod.keyban.io
  • URL: https://api.prod.keyban.io/v1/push-tokens
  • Auth: bearer (a scheme the document does not define)

Request body

tokenstring required

Expo push token of this device, as returned by expo-notifications' getExpoPushTokenAsync. Registering the same token again refreshes its lastSeenAt and re-binds it to the calling user.

platform'ios' | 'android' required

OS of the device holding the token.

Example request

{
  "token": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]",
  "platform": "ios"
}

Response

Device registered

idstring uuid required

Entity UUID

createdAtstring date-time required

Creation date (ISO 8601)

updatedAtstring date-time required

Last update date (ISO 8601)

tokenstring required

The registered Expo push token.

platform'ios' | 'android' required

OS of the device holding the token.

Example response

{
  "token": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]",
  "platform": "ios"
}

Changes

No recorded changes to this operation across all 1 revision of this API.