Devices API

Device pairing and management.

Endpoints

MethodPathDescription
GET/devicesList paired devices
POST/devices/pairStart pairing flow
DELETE/devices/{id}Remove a device

GET /devices

curl http://localhost:4200/devices

Response (200)

{
  "devices": [
    {
      "id": "dev-001",
      "name": "iPhone 15 Pro",
      "paired_at": "2026-06-01T10:00:00Z",
      "last_seen": "2026-06-04T09:30:00Z"
    }
  ]
}

POST /devices/pair

Start a new device pairing flow. Returns a pairing code/QR payload.

curl -X POST http://localhost:4200/devices/pair

Response (200)

{
  "pairing_code": "ABCD-1234",
  "expires_at": "2026-06-04T10:10:00Z",
  "qr_data": "hoziron://pair?code=ABCD-1234&host=localhost:4200"
}

DELETE /devices/{id}

curl -X DELETE http://localhost:4200/devices/dev-001

Response (204 No Content)