Skip to main content
POST
/
devices
curl -X POST https://api.bota.dev/v1/devices \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "serial_number": "SN-2025-001234",
    "device_type": "bota_pin_v1",
    "firmware_version": "1.2.0"
  }'
{
  "id": "dev_abc123",
  "serial_number": "SN-2025-001234",
  "device_type": "bota_pin_v1",
  "firmware_version": "1.2.0",
  "status": "unbound",
  "end_user_id": null,
  "metadata": null,
  "created_at": "2025-01-15T10:30:00Z",
  "bound_at": null
}
Register a device using its serial number. If a device with the same serial number already exists, the existing device is returned.
serial_number
string
required
Device serial number (unique identifier from hardware).
device_type
string
Type or model of device (e.g., bota_pin_v1).
firmware_version
string
Current firmware version on the device.
metadata
object
Arbitrary key-value metadata.
curl -X POST https://api.bota.dev/v1/devices \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "serial_number": "SN-2025-001234",
    "device_type": "bota_pin_v1",
    "firmware_version": "1.2.0"
  }'
{
  "id": "dev_abc123",
  "serial_number": "SN-2025-001234",
  "device_type": "bota_pin_v1",
  "firmware_version": "1.2.0",
  "status": "unbound",
  "end_user_id": null,
  "metadata": null,
  "created_at": "2025-01-15T10:30:00Z",
  "bound_at": null
}
If the device already exists (matched by serial_number), the existing device is returned with a 200 status code instead of 201.