API v2: User Devices

Data Structures

UserDeviceModel

Attribute

Type

Required

Description

id

string

Read-only. Unique identifier. Protected.

user_authentication_method_id

string

Read-only. Unique identifier of the associated authentication method.

platform

string

yes

Mobile device platform. It cannot be changed once it has been initialized. Available values: android, ios.

pushid

string

yes

A mobile device identifier necessary to address the device we want to send a push notification. Protected.

user_id

string

yes

Immutable. Unique per device. Requires read right on the user object for PATCH requests.

created_at

datetime

Read-only. Timestamp of creation.

modified_at

datetime

Read-only. Timestamp of modification.

removed

boolean

Read-only.

Retrieve Available Attributes of the UserDeviceModel

Request

Method

GET

Path

/api/v2/objspec/user_device

GET /api/v2/objspec/user_device

Example Request

curl -s -k -X GET \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  'https://10.0.214.98/api/v2/objspec/user_device'

Update Mobile Device for Authentication Method

Request

Method

PATCH

Path

/api/v2/user/<user_id>/authentication/ <user_authentication_method_id>/device

Headers

Content-Type: Application/json

Body

UserDeviceModel

PATCH /api/v2/user/<user_id>/authentication/<user_authentication_method_id> /device

Example Request

curl -s -k -X PATCH \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  -H 'Content-Type: application/json' \
  'https://10.0.214.98/api/v2/user/9115285645797883905/authentication/9115285645797883999/device' \
  -d '{"pushid": "cihaz-uuid-1234abcd"}'

Response

{
  "result": "success"
}