Skip to main content
PUT
/
api
/
v1
/
device
Set push notification token
curl --request PUT \
  --url https://api.hevn.finance/api/v1/device \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "pushToken": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "deviceId": "<string>",
  "deviceType": "<string>",
  "deviceName": "<string>",
  "notificationToken": "<string>",
  "isActive": true,
  "createdAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
default:Bearer <token>
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

device-id
string | null
device-type
string
default:ios
device-name
string
default:ios
x-api-key
string | null

Body

application/json

Schema for setting push notification token. Device is identified by header.

pushToken
string
required

Push notification token (FCM/APNs)

deviceName
string | null

Human-readable device name

Response

Successful Response

Schema for device response.

id
string<uuid>
required
userId
string<uuid>
required
deviceId
string
required
deviceType
string
required
deviceName
string | null
required
notificationToken
string | null
required
isActive
boolean
required
createdAt
string<date-time>
required