Skip to main content
GET
/
devices
/
{id}
/
state
curl https://api.bota.dev/v1/devices/dev_abc123/state \
  -H "Authorization: Bearer sk_live_..."
{
  "device_id": "dev_abc123",
  "online": true,
  "recording": {
    "active": true,
    "recording_id": "rec_xyz789",
    "started_at": "2025-01-20T10:30:00Z",
    "initiated_by": "remote"
  },
  "battery_percent": 85,
  "storage_used_mb": 256,
  "storage_total_mb": 1024,
  "last_heartbeat_at": "2025-01-20T10:35:00Z"
}
id
string
required
The device’s unique identifier (e.g., dev_abc123).
curl https://api.bota.dev/v1/devices/dev_abc123/state \
  -H "Authorization: Bearer sk_live_..."
{
  "device_id": "dev_abc123",
  "online": true,
  "recording": {
    "active": true,
    "recording_id": "rec_xyz789",
    "started_at": "2025-01-20T10:30:00Z",
    "initiated_by": "remote"
  },
  "battery_percent": 85,
  "storage_used_mb": 256,
  "storage_total_mb": 1024,
  "last_heartbeat_at": "2025-01-20T10:35:00Z"
}

Response Fields

FieldTypeDescription
device_idstringThe device’s unique identifier
onlinebooleanWhether the device is currently online and reachable
recording.activebooleanWhether the device is currently recording
recording.recording_idstringID of the current recording (if active)
recording.started_atstringISO 8601 timestamp when recording started
recording.initiated_bystring"local" (button press) or "remote" (API command)
battery_percentnumberBattery level (0-100), null if unknown
storage_used_mbnumberStorage used in MB, null if unknown
storage_total_mbnumberTotal storage in MB, null if unknown
last_heartbeat_atstringLast heartbeat timestamp from device