Skip to content

Device

The APIs here are designed for device management, including obtaining device lists, device information, device statuses, device configurations, and more.

Fetch Devices

Obtain a list of all current devices. The device ID is required for enrolling an NFC card.

Request URL: /api/v1/developer/devices
Permission Key: view:device
Method: GET

Request Header

ParameterRequiredTypeDescription
AuthorizationTStringToken required for authentication and access control.

Query Parameters

ParameterRequiredTypeDescriptionExample
refreshFStringRefresh the device cache. If true, fetches real-time device info but may be slower.refresh=true

Response Body

ParameterRequiredTypeDescriptionPurposeRelated API
idTStringIdentity ID of the device.Used for enrolling an NFC card./api/v1/developer/credentials/nfc_cards sessions
nameTStringName of the device.
typeTStringDevice model type (e.g., UA-G2-PRO, UAH-DOOR).
aliasTStringAlias of the device.
capabilitiesTArray[String]List of device capabilities (e.g., pin_code, nfc, face, qr_code).
connected_uah_idTStringMAC address of the connected UA Hub (empty for hubs themselves).
is_adoptedTBooleanWhether the device has been adopted.
is_connectedTBooleanWhether the device is currently connected.
is_managedTBooleanWhether the device is managed.
is_onlineTBooleanWhether the device is online.
location_idTStringDoor ID the device is bound to.

Note: The data field is a nested array (array of arrays). Each inner array groups devices by door/location.

Request Sample: Shell/cURL

bash
curl '{host}/api/v1/developer/devices?refresh=true' \
-H 'Authorization: Bearer wHFmHR*****kD6wHg' \
-H 'accept: application/json' \
--insecure

Response Body

json
{
  "code": "SUCCESS",
  "data": [
    [
      {
        "alias": "",
        "capabilities": [
          "pin_code",
          "nfc",
          "face",
          "qr_code",
          "is_reader",
          "support_reboot"
        ],
        "connected_uah_id": "58d61f25c2d5",
        "id": "58d61f309629",
        "is_adopted": true,
        "is_connected": true,
        "is_managed": true,
        "is_online": true,
        "location_id": "2ad41f5a-55ca-4751-b36e-432833638c62",
        "name": "UA G2 Pro 9629",
        "type": "UA-G2-PRO"
      },
      {
        "alias": "",
        "capabilities": [
          "unlock_failure_limit",
          "emergency_settings",
          "is_hub",
          "pin_code"
        ],
        "connected_uah_id": "",
        "id": "58d61f25c2d5",
        "is_adopted": true,
        "is_connected": true,
        "is_managed": true,
        "is_online": true,
        "location_id": "2ad41f5a-55ca-4751-b36e-432833638c62",
        "name": "UA-HUB-DOOR-C2D5",
        "type": "UAH-DOOR"
      }
    ]
  ],
  "msg": "success"
}

Fetch Access Device's Access Method Settings

This API allows you to fetch the current access method settings of an Access device.

Request URL: /api/v1/developer/devices/:device_id/settings
Permission Key: view:device
Method: GET
UniFi Access Requirement: Version 3.3.10 or later

Request Header

ParameterRequiredTypeDescription
AuthorizationTStringToken required for authentication and access control.

Request Path

ParameterRequiredTypeDescriptionHow to Get It?
device_idTStringUnique ID of the device.Get it from the API /api/v1/developer/devices

Request Sample: Shell/cURL

bash
curl --location 'https://192.168.1.1:12445/api/v1/developer/devices/942a6f4247b2/settings' \
--header 'Authorization: Bearer bphw1H4jw7q9uQ751PN3Nw'

Response Body

ParameterTypeDescription
nfcObjectNFC access method setting.
nfc.enabledStringIndicates whether the NFC access method is enabled ("true" or "false").
bt_tapObjectMobile Tap (via Bluetooth) access method setting.
bt_tap.enabledStringIndicates whether Mobile Tap is enabled ("true" or "false").
bt_buttonObjectMobile Unlock (via Bluetooth) access method setting.
bt_button.enabledStringIndicates whether Mobile Unlock is enabled ("true" or "false").
bt_shakeObjectMobile Shake (via Bluetooth) access method setting.
bt_shake.enabledStringIndicates whether Mobile Shake is enabled ("true" or "false").
mobile_waveObjectMobile Wave access method setting.
mobile_wave.enabledStringIndicates whether Mobile Wave is enabled ("true" or "false").
pin_codeObjectPIN access method setting.
pin_code.enabledStringIndicates whether PIN is enabled ("true" or "false").
pin_code.pin_code_shuffleStringDetermine whether PIN shuffle is enabled ("true" or "false").
faceObjectFace Unlock access method setting.
face.enabledStringDetermine whether Face Unlock is enabled ("true" or "false").
face.anti_spoofing_levelStringenum anti_spoofing_level {high, medium, no} Anti-spoofing security level for Face Unlock.
face.detect_distanceStringenum detect_distance {near, medium, far} Face Unlock detection distance setting.
waveObjectHand Wave access method setting.
wave.enabledStringIndicates whether Hand Wave is enabled ("true" or "false").
qr_codeObjectQR code access method setting.
qr_code.enabledStringIndicates whether QR code is enabled ("true" or "false").
touch_passObjectTouch Pass access method setting.
touch_pass.enabledStringIndicates whether Touch Pass is enabled ("true" or "false").

Response Sample

json
{
  "code": "SUCCESS",
  "data": {
    "access_methods": {
      "bt_button": {
        "enabled": "yes"
      },
      "bt_tap": {
        "enabled": "yes"
      },
      "face": {
        "anti_spoofing_level": "no",
        "detect_distance": "far"
      },
      "nfc": {
        "enabled": "yes"
      },
      "pin_code": {
        "enabled": "yes",
        "pin_code_shuffle": "no"
      },
      "qr_code": {
        "enabled": "yes"
      },
      "touch_pass": {
        "enabled": "yes"
      }
    },
    "device_id": "942a6f4247b2"
  },
  "msg": "success"
}

Update Access Device's Access Method Settings

This API allows you to update the access method settings of an Access device.

Request URL: /api/v1/developer/devices/:device_id/settings
Permission Key: edit:device
Method: PUT \
UniFi Access Requirement: Version 3.3.10 or later

Request Header

ParameterRequiredTypeDescription
AuthorizationTStringBearer Token required for authentication and access control.
Content-TypeTStringMust be application/json.

Request Path

ParameterRequiredTypeDescriptionHow to Get It?
device_idTStringUnique ID of the device.Get it from the API /api/v1/developer/devices

Request Body

ParameterRequiredTypeDescriptionExampleHow to Get It?
nfcFObjectNFC access method setting.
nfc.enabledFStringIndicates whether the NFC access method is enabled ("true" or "false")."true"
bt_tapFObjectMobile Tap (via Bluetooth) access method setting.
bt_tap.enabledFStringIndicates whether Mobile Tap is enabled ("true" or "false")."true"
bt_buttonFObjectMobile Unlock (via Bluetooth) access method setting.
bt_button.enabledFStringIndicates whether Mobile Unlock is enabled ("true" or "false")."true"
bt_shakeFObjectMobile Shake (via Bluetooth) access method setting.
bt_shake.enabledFStringIndicates whether Mobile Shake is enabled ("true" or "false")."false"
mobile_waveFObjectMobile Wave access method setting.
mobile_wave.enabledFStringIndicates whether Mobile Wave is enabled ("true" or "false")."true"
pin_codeFObjectPIN access method setting.
pin_code.enabledFStringIndicates whether PIN is enabled ("true" or "false")."true"
pin_code.pin_code_shuffleFStringIndicates whether PIN shuffle is enabled ("true" or "false")."false"
faceFObjectFace Unlock access method setting.
face.enabledFStringIndicates whether Face Unlock is enabled ("true" or "false")."true"
face.anti_spoofing_levelFStringenum anti spoofing_level {high, medium, no} Anti spoofing security level for Face Unlock."medium"
face.detect_distanceFStringenum detect_distance {near, medium, far} Face Unlock detection distance setting."medium"
waveFObjectHand Wave access method setting.
wave.enabledFStringIndicates whether Hand Wave is enabled ("true" or "false")."false"
qr_codeFObjectQR code access method setting.
qr_code.enabledFStringIndicates whether QR code is enabled ("true" or "false")."true"
touch_passFObjectTouch Pass access method setting.
touch_pass.enabledFStringIndicates whether Touch Pass is enabled ("true" or "false")."true"

NOTE: pin_code.pin_code_shuffle setting only takes effect when pin_code.enabled is set to "true" .

NOTE: face.anti_spoofing_level and face.detect_distance settings only take effect when face.enabled is set to "true" .

NOTE: anti_spoofing_level and detect_distance must use valid combinations to adjust Face Unlock sensitivity. The following combinations are supported: no/far , no/medium , medium/near , high/near . Only these combinations will take effect.

Request Sample: Shell/cURL

bash
curl --location --request PUT \
'https://192.168.1.1:12445/api/v1/developer/devices/942a6f4247b2/settings' \
--header 'Authorization: Bearer N8oZJZ6U16i4mN6ZnRhw/A' \
--header 'Content-Type: application/json' \
--data '{
    "access_methods": {
        "bt_button": { "enabled": "yes" },
        "bt_tap": { "enabled": "yes" },
        "face": { "anti_spoofing_level": "medium", "detect_distance": "medium" },
        "nfc": { "enabled": "yes" },
        "pin_code": { "enabled": "yes", "pin_code_shuffle": "no" },
        "qr_code": { "enabled": "yes" },
        "touch_pass": { "enabled": "yes" }
    }
}'

Response Sample

json
{
  "code": "SUCCESS",
  "data": "success",
  "msg": "success"
}

Trigger Doorbells

This API allows you to trigger the doorbell on an Intercom or Reader Pro.

Request URL: /api/v1/developer/devices/:device_id/doorbell
Permission Key: edit:device
Method: POST
UniFi Access Requirement: Version 4.0.10 or later

Request Header

ParameterRequiredTypeDescription
AuthorizationTStringBearer Token required for authentication and access control.
Content-TypeTStringMust be application/json.

Request Path

ParameterRequiredTypeDescriptionHow to Get It?
device_idTStringUnique ID of the reader.Get it from the API /api/v1/developer/devices

Request Body

ParameterRequiredTypeDescriptionExample
room_nameTStringSpecifies the Intercom's directory name to trigger the doorbell. Use empty string to ring the default doorbell."intercom directory name"
cancelFBooleanIf set to true, cancels the previous doorbell if it's still ringing.false

Note (verified against live API): room_name is required — omitting it or sending an empty body returns CODE_PARAMS_INVALID. An empty string "" is accepted and rings the default doorbell.

Request Sample: Shell/cURL

yaml
curl --location 'https://192.168.1.1:12445/api/v1/developer/devices/788a20c002c7/doorbell' \
--header 'Authorization: Bearer qw8wle29QpEiUuRzdraOdoLQirvukxPT' \
--header 'Content-Type: application/json' \
--data '{ "room_name": "intercom directory name", "cancel": true }'

Response Sample

json
{
  "code": "SUCCESS",
  "data": "success",
  "msg": "success"
}