Skip to main content
Skip table of contents

Updating device information (push tokens)

Update device information

PUT/api/v1/devices

Headers

Authorization

Bearer token

Accept

application/json

X-Client

ios-cctv|android-cctv|thick-legal|web

X-UUID

unique device id

Body

json

JSON
{
    "fcm_token": "some token",
    "voip_token": "some token",
    "apn_token": "some token",
    "huawei_token": "some token"
}

fcm_tokenoptional

string

FCM token for the device (used by all Android devices except Huawei)

voip_tokenoptional

string

VOIP token for the device (used by all iOS devices for intercom calls)

apn_tokenoptional

string

APN token for the device (used by all iOS devices for notification push instead of FCM)

huawei_tokenoptional

string

Device token (used only for Huawei devices)

Response

204

Returns an empty body

401

Authorization token not provided or invalid, see Obtaining a token

422

Returns a JSON object with an error, see Validation

JSON
{
    "message": "There won't be any informative message here",
    "errors": {
        "any_key": [
            "Here the error cause will be described"
        ]
    }
}

Example

JSON
curl -k --location --request PUT 'https://vms.local/api/v1/devices' \
--header 'Authorization:Bearer token' \
--header 'Accept:application/json' \
--header 'X-Client:ios-cctv|android-cctv|thick-legal|web' \
--header 'X-UUID:unique device id' \
--header 'Content-Type: application/json \
--data-raw '{
    "fcm_token": "some token",
    "voip_token": "some token",
    "apn_token": "some token",
    "huawei_token": "some token"
}'
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.