cURL
curl --request PATCH \ --url https://api.example.com/v1/devices/{id} \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "firmware_version": "<string>", "metadata": {}, "settings": { "upload": { "mode": "<string>", "streaming_enabled": true, "upload_delay_minutes": 123, "daily_data_limit_mb": 123, "allow_roaming": true, "pause_on_low_battery": true }, "audio": { "codec": "<string>", "sample_rate_khz": 123, "bitrate_kbps": 123 }, "power": { "auto_sleep_minutes": 123, "low_battery_threshold_percent": 123 } } } '
{ "id": "dev_abc123", "serial_number": "SN-2025-001234", "model": "bota_pin", "firmware_version": "1.3.0", "status": "bound", "end_user_id": "eu_xyz789", "metadata": {}, "settings": { "upload": { "mode": "wifi_only", "streaming_enabled": true, "upload_delay_minutes": 5, "daily_data_limit_mb": 500, "allow_roaming": false, "pause_on_low_battery": true }, "audio": { "codec": "opus", "sample_rate_khz": 16, "bitrate_kbps": 32 }, "power": { "auto_sleep_minutes": 30, "low_battery_threshold_percent": 20 } }, "created_at": "2025-01-15T10:30:00Z", "updated_at": "2025-01-15T14:20:00Z" }
Update device metadata and settings
devices:write
curl -X PATCH https://api.bota.dev/v1/devices/dev_abc123 \ -H "Authorization: Bearer sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "firmware_version": "1.3.0", "settings": { "upload": { "mode": "wifi_only" } } }'
dev_abc123
Show settings properties
Show upload properties
ble_only
auto
wifi_preferred
4g_preferred
wifi_only
4g_only
Show audio properties
opus
aac
wav
16
24
48
8
320
Show power properties
curl -X PATCH https://api.bota.dev/v1/devices/dev_abc123 \ -H "Authorization: Bearer sk_live_..." \ -H "Content-Type: application/json" \ -d '{"settings": {"upload": {"mode": "4g_preferred"}}}'
curl -X PATCH https://api.bota.dev/v1/devices/dev_abc123 \ -H "Authorization: Bearer sk_live_..." \ -H "Content-Type: application/json" \ -d '{"firmware_version": "1.4.0"}'
curl -X PATCH https://api.bota.dev/v1/devices/dev_abc123 \ -H "Authorization: Bearer sk_live_..." \ -H "Content-Type: application/json" \ -d '{"metadata": {"department": "Sales", "region": "West"}}'
curl -X PATCH https://api.bota.dev/v1/devices/dev_abc123 \ -H "Authorization: Bearer sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "settings": { "upload": { "mode": "wifi_only", "allow_roaming": false } } }'
settings