Devices
Create Recording Command
Send a command to start or stop recording on a device
POST
Send a remote command to a device. Commands are delivered via BLE (through the mobile app) or via heartbeat response (for 4G/WiFi devices).Documentation Index
Fetch the complete documentation index at: https://docs.bota.dev/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
Requires an API key withdevices:write scope.
Path Parameters
The device’s unique identifier (e.g.,
dev_abc123).Request Body
The command type. One of:
start_recording- Start a new recordingstop_recording- Stop the current recording
Optional parameters for the command.
Maximum recording duration in seconds (1-86400). Default: 3600 (1 hour).
Whether to upload immediately after recording stops. Default: true.
Custom metadata to attach to the recording.
Unique key to prevent duplicate command creation.
Time-to-live for the command in seconds. Command expires if not executed within this time. Default: 300 (5 minutes).
Response
Returns the command object withstatus set to pending.
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Command identifier |
device_id | string | Target device (dev_*) |
type | string | start_recording or stop_recording |
status | string | Command status (see Command Lifecycle below) |
params | object | Command parameters |
grant_token | string | Signed authorization token for the device |
result | object | null | Execution result (populated after execution) |
error | object | null | Error details (if failed) |
expires_at | string | null | Expiration timestamp (ISO 8601) |
delivered_at | string | null | When delivered to device (ISO 8601) |
executed_at | string | null | When executed on device (ISO 8601) |
created_at | string | Creation timestamp (ISO 8601) |
Command Lifecycle
Commands go through the following states:| Status | Description |
|---|---|
pending | Command created, waiting to be delivered to device |
delivered | Command received by device, execution in progress |
executed | Command successfully executed |
failed | Command execution failed |
expired | Command expired before delivery |
cancelled | Command was cancelled via API |
Notes
- Commands are delivered to devices via BLE (through the mobile app) or WiFi/4G (direct push)
- If the device is offline, commands will be queued and delivered when the device comes online
- The
grant_tokenis a signed JWT that authorizes the device to execute the command - For BLE-connected devices, the mobile app must relay the command to the device

