Skip to main content
POST
Register a device using its serial number. The response includes the Bota device ID (dev_*) that you use for later device APIs such as bind, heartbeat, commands, and settings.
Store the returned id alongside the device serial number in your system. If the mapping is unavailable later, recover it with GET /devices?serial_number={serial_number}.

Authentication

Requires an API key with devices:write scope.

Request Body

serial_number
string
required
Device serial number (unique identifier from hardware).
model
string
required
Device model. One of bota_pin, bota_pin_pro, or bota_note.
firmware_version
string
Current firmware version on the device.
metadata
object
Arbitrary key-value metadata.

Response

Returns the newly registered device object.

Response Fields

Resolving a Device ID from a Serial Number

For a newly registered device, use the id returned by this endpoint. For an already registered device, use the exact List Devices serial_number filter. If registration returns 409 and the filter returns a device, reuse its dev_* ID. If the filter returns an empty data array, the device is registered elsewhere or is inaccessible to this project.