Skip to content

Queue a command

Rate limit 5 requests/min for config, reboot, immobilize and mobilize (sensitive), 120 requests/min otherwise (authenticated)

POST
/devices/{device}/commands
curl --request POST \
--url https://app.ridebox.my/api/devices/YOUR_DEVICE_UUID/commands \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Version: v1' \
--data '{ "command": "locate" }'

Queues a command for the device and answers 202 with the command to poll. The device has not acknowledged it yet.

Sensitive tier (5 requests/min per user) when command is config, reboot, immobilize or mobilize; otherwise the authenticated tier (120 requests/min per user).

device
required
string format: uuid

The device uuid.

Example

YOUR_DEVICE_UUID
X-API-Version
string
default: v1
Allowed values: v1

Selects the API version. With no version header the request is served as v1. An Accept: application/vnd.ridebox+v1+json header selects the version too; X-API-Version is read first when both are sent. An unsupported version answers 400 with supported_versions.

Example

v1
Media type application/json
Create command request
object
command
required
string
Allowed values: locate arm disarm config calibrate_imu reboot immobilize mobilize

Example

locate
payload
One of:
Device settings update

All fields are optional but at least one must be present. Absent keys keep their stored value. A present wifi replaces the whole list, up to 5 networks.

object
>= 1 properties
batch_ms
integer
>= 5000 <= 300000

Example

30000
heartbeat_s
integer
>= 30 <= 3600

Example

900
low_chg_v
number format: float
>= 12 <= 14

Example

13.2
low_rest_v
number format: float
>= 11 <= 13

Example

12.2
geofence
Geofence

A circular geofence with a radius between 20 m and 5,000 m.

object
lat
required
number format: double
>= -90 <= 90

Example

1.4927
lng
required
number format: double
>= -180 <= 180

Example

103.7414
radius_m
required
integer
>= 20 <= 5000

Example

50
wifi
Array<object>
<= 5 items
WiFi network input
object
ssid
required
string
<= 32 characters

Example

HomeWiFi
pass
required

The network password. Write-only: delivered to the device, never stored and never returned.

string format: password
<= 64 characters

Example

YOUR_WIFI_PASSWORD

Command queued and published; not yet acknowledged.

Media type application/json
Command response
object
data
required
Command

A queued device command. status is always present.

object
id
required

The command UUID. Use it to poll the command.

string format: uuid
command
required
Command type

The command type. ota appears in command history but cannot be queued through this API.

string
Allowed values: locate arm disarm config calibrate_imu ota reboot immobilize mobilize
status
required
Command status

pending before delivery, sent once delivered, acked once the device acknowledges it, failed when the device reports an error, and expired after 120 seconds with no acknowledgement.

string
Allowed values: pending sent acked failed expired
payload
required

The arguments stored for the command, or null for commands that take none. A config command echoes the accepted settings without any WiFi pass. Secrets are never stored or returned.

object | null
sent_at
required

When the command was sent. Null while status is pending.

string | null format: date-time
acked_at
required

When the device acknowledged the command. Null until then.

string | null format: date-time
result
required

ok or err. Null until the device acknowledges the command.

string | null
Allowed values: ok err
message
required

A short reason from the device. Null unless result is err.

string | null
<= 64 characters

Example

{
"data": {
"id": "YOUR_COMMAND_UUID",
"command": "locate",
"status": "sent",
"payload": null,
"sent_at": "2026-09-12T02:15:00Z",
"acked_at": null,
"result": null,
"message": null
}
}
X-API-Version
string
Allowed value: v1

The API version that served this response. Always v1 on this surface.

Example
v1
X-RateLimit-Limit
integer

Requests permitted in the current window for the applicable tier.

Example
120
X-RateLimit-Remaining
integer

Requests remaining in the current window.

Example
0

Missing, invalid, expired or revoked token. When a token was presented, code tells an expired token from a revoked one.

Media type application/json
Error envelope

The single shape used by every non-2xx response. message is always present and safe to display. errors is present only on 422. code is present on a 401 that presented a token.

object
message
required

Human-readable, safe to display to the end user.

string
errors

Present only on 422. Field name to array of messages.

object
key
additional properties
Array<string>
code
Machine-readable error code

Tells an expired token, which you can replace by signing in again, from a revoked one.

string
Allowed values: token_expired token_revoked

Examples

No token presented

{
"message": "Unauthenticated."
}
X-API-Version
string
Allowed value: v1

The API version that served this response. Always v1 on this surface.

Example
v1

Not found, or owned by another account. The two cases are deliberately indistinguishable.

Media type application/json
Error envelope

The single shape used by every non-2xx response. message is always present and safe to display. errors is present only on 422. code is present on a 401 that presented a token.

object
message
required

Human-readable, safe to display to the end user.

string
errors

Present only on 422. Field name to array of messages.

object
key
additional properties
Array<string>
code
Machine-readable error code

Tells an expired token, which you can replace by signing in again, from a revoked one.

string
Allowed values: token_expired token_revoked

Example

{
"message": "Not found."
}
X-API-Version
string
Allowed value: v1

The API version that served this response. Always v1 on this surface.

Example
v1

Validation failed. errors is keyed by field name.

Media type application/json
Error envelope

The single shape used by every non-2xx response. message is always present and safe to display. errors is present only on 422. code is present on a 401 that presented a token.

object
message
required

Human-readable, safe to display to the end user.

string
errors

Present only on 422. Field name to array of messages.

object
key
additional properties
Array<string>
code
Machine-readable error code

Tells an expired token, which you can replace by signing in again, from a revoked one.

string
Allowed values: token_expired token_revoked

Example

{
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
}
X-API-Version
string
Allowed value: v1

The API version that served this response. Always v1 on this surface.

Example
v1

Rate limited. Back off and honour Retry-After.

Media type application/json
Error envelope

The single shape used by every non-2xx response. message is always present and safe to display. errors is present only on 422. code is present on a 401 that presented a token.

object
message
required

Human-readable, safe to display to the end user.

string
errors

Present only on 422. Field name to array of messages.

object
key
additional properties
Array<string>
code
Machine-readable error code

Tells an expired token, which you can replace by signing in again, from a revoked one.

string
Allowed values: token_expired token_revoked

Example

{
"message": "Too many requests. Please try again shortly."
}
Retry-After
required
integer
>= 1

Seconds to wait before retrying.

Example
42
X-RateLimit-Limit
integer

Requests permitted in the current window for the applicable tier.

Example
120
X-RateLimit-Remaining
integer

Requests remaining in the current window.

Example
0
X-RateLimit-Reset
integer

Unix timestamp at which the current window resets. Sent on 429.

Example
1789180500
X-API-Version
string
Allowed value: v1

The API version that served this response. Always v1 on this surface.

Example
v1