Devices

Register Device

Register a device push token for the authenticated user. If the token already exists, it will be reassigned to the current user.

post/api/v1/devices

Request

  • Base URL: https://www.endlesstravelplans.com
  • URL: https://www.endlesstravelplans.com/api/v1/devices
  • Auth: HTTP bearer

Request body

device_tokenstring required

The push notification token.

platformstring required

The device platform.

device_namestring nullable

The device name.

Example request

{
  "device_token": "ExponentPushToken[xxxxxx]",
  "platform": "ios",
  "device_name": "iPhone 15"
}

Response

OR

Example response

{
  "device": {
    "id": 1,
    "device_token": "ExponentPushToken[xxxxxx]",
    "platform": "ios"
  }
}

Changes

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