QueryGet devices linked to a user

Get devices linked to a user

Returns the user's linked devices. Optional ?type= query param filters by device kind. API-key (B2B) requests are auto-scoped to the key's orgId; JWT (B2C) callers see all of the user's devices.

curl -X GET "https://api.spkey.co/users/example_string/devices?type=matter" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
  -H "X-API-Key: YOUR_API_KEY"
{
  "devices": [
    {
      "deviceId": "example_string",
      "deviceType": "matter",
      "orgId": "example_string",
      "name": "John Doe",
      "addedBy": "example_string",
      "addedAt": "example_string"
    }
  ],
  "totalCount": 3.14
}
GET
/users/{id}/devices
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (JWT)
Bearer Tokenstring
Required

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.
API Key (header: X-API-Key)
X-API-Keystring
Required

API key for B2B organization access. Provided during organization onboarding.

API key for B2B organization access. Provided during organization onboarding.
query
typestring

Filter by device type (matter | camera)

Options: matter, camera, rtsp-camera
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

header
X-API-Keystring
Required

API Key for authentication. API key for B2B organization access. Provided during organization onboarding.

Path Parameters

Query Parameters

typestring

Filter by device type (matter | camera)

Allowed values:mattercamerartsp-camera

Responses

devicesarray
Required
totalCountnumber
Required