Devices API
Manage device pairing for your agent. Devices start in apending state and can be approved, denied, or revoked.
List devices
Response
| Field | Type | Description |
|---|---|---|
pending | array | Devices awaiting approval |
approved | array | Devices that have been approved |
Device object
| Field | Type | Description |
|---|---|---|
id | string | Unique device identifier |
name | string | Human-readable device name |
ip | string | IP address of the device |
firstSeen | string | ISO 8601 timestamp when the device was first detected |
lastSeen | string | ISO 8601 timestamp of the device’s most recent activity |
status | string | One of pending, approved, denied, or revoked |
Manage a device
approve— only valid when the device ispendingdeny— only valid when the device ispendingrevoke— only valid when the device isapproved
Request body
| Field | Type | Required | Description |
|---|---|---|---|
deviceId | string | Yes | The identifier of the device to act on |
action | string | Yes | One of approve, deny, or revoke |
Response
| Field | Type | Description |
|---|---|---|
success | boolean | true when the action was applied |
device | object | The updated device object |
pending | array | Remaining pending devices |
approved | array | Currently approved devices |
Errors
| Code | Description |
|---|---|
| 400 | Missing required fields: deviceId, action — one or both required fields are missing |
| 400 | Invalid action. Must be: approve, deny, or revoke — the action is not recognized |
| 400 | Device is not pending — attempted to approve or deny a device that is not in pending status |
| 400 | Device is not approved — attempted to revoke a device that is not in approved status |
| 400 | Invalid request body — the request body is not valid JSON |
| 404 | Device not found — no device exists with the given identifier |