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

string
required
Device serial number (lifetime-unique hardware identity). A serial remains reserved after device deletion and cannot be registered as a new device row.
string
required
Device model. One of bota_pin, bota_pin_pro, or bota_note.
string
Current firmware version on the device.
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 serial is reserved by a device that is registered elsewhere, deleted, or inaccessible to this project. The API does not disclose which case applies.