Examples
Set these first, using your own values.
export RIDEBOX_API="https://app.ridebox.my/api"export RIDEBOX_TOKEN="YOUR_TOKEN"List your devices
Section titled “List your devices”curl "$RIDEBOX_API/devices" \ -H "Authorization: Bearer $RIDEBOX_TOKEN" -H "Accept: application/json"Check where the bike is
Section titled “Check where the bike is”curl "$RIDEBOX_API/devices/YOUR_DEVICE_UUID/state" \ -H "Authorization: Bearer $RIDEBOX_TOKEN" -H "Accept: application/json"{ "data": { "state": "parked", "armed": true, "last_seen_at": "2026-11-08T09:00:00Z", "position": { "lat": 3.139, "lng": 101.6869, "heading_deg": 180 }, "volts": 12.6, "stale": false }}state is parked, riding or alert. position is null until the bike has a GPS fix. stale is true when the bike has stopped reporting, and the other values are then from its last report.
Send a command and wait for the result
Section titled “Send a command and wait for the result”Commands are asynchronous. A 202 means the command was accepted, not that the bike acted on it.
curl -X POST "$RIDEBOX_API/devices/YOUR_DEVICE_UUID/commands" \ -H "Authorization: Bearer $RIDEBOX_TOKEN" \ -H "Content-Type: application/json" -H "Accept: application/json" \ -d '{"command":"locate"}'Use the id from the response to check progress.
curl "$RIDEBOX_API/devices/YOUR_DEVICE_UUID/commands/YOUR_COMMAND_UUID" \ -H "Authorization: Bearer $RIDEBOX_TOKEN" -H "Accept: application/json"command |
What it does |
|---|---|
locate |
Asks the bike for a fresh position |
arm |
Arms the bike |
disarm |
Disarms the bike |
calibrate_imu |
Calibrates the box. The bike must be upright and still |
reboot |
Restarts the box |
status |
Meaning |
|---|---|
pending |
Queued |
sent |
Sent to the bike, waiting for it to reply |
acked |
The bike confirmed it |
failed |
The bike rejected it. See message |
expired |
No reply within about 2 minutes. The bike may be out of coverage |
Do not send a payload with these commands.
Change device settings
Section titled “Change device settings”Send only the settings you want to change. This queues a change to the bike.
curl -X PATCH "$RIDEBOX_API/devices/YOUR_DEVICE_UUID/settings" \ -H "Authorization: Bearer $RIDEBOX_TOKEN" \ -H "Content-Type: application/json" -H "Accept: application/json" \ -d '{"low_rest_v":12.0,"geofence":{"lat":3.139,"lng":101.6869,"radius_m":100}}'| Field | Range |
|---|---|
batch_ms |
5,000–300,000 |
heartbeat_s |
30–3,600 |
low_chg_v |
12.0–14.0 |
low_rest_v |
11.0–13.0 |
geofence.lat, geofence.lng |
Valid coordinates |
geofence.radius_m |
20–5,000 |
wifi |
Up to five items with ssid and pass. Sending it replaces the whole list |
List rides in a date range
Section titled “List rides in a date range”curl "$RIDEBOX_API/devices/YOUR_DEVICE_UUID/ride-sessions?from=2026-10-01&to=2026-10-31&min_distance_km=5" \ -H "Authorization: Bearer $RIDEBOX_TOKEN" -H "Accept: application/json"Download a ride as GPX
Section titled “Download a ride as GPX”curl "$RIDEBOX_API/ride-sessions/YOUR_RIDE_UUID/gpx" \ -H "Authorization: Bearer $RIDEBOX_TOKEN" \ -o ride.gpxRead and acknowledge alerts
Section titled “Read and acknowledge alerts”curl "$RIDEBOX_API/alerts?acknowledged=false&type=tamper" \ -H "Authorization: Bearer $RIDEBOX_TOKEN" -H "Accept: application/json"curl -X POST "$RIDEBOX_API/alerts/YOUR_ALERT_UUID/acknowledge" \ -H "Authorization: Bearer $RIDEBOX_TOKEN" -H "Accept: application/json"Alert type is tamper, geofence_exit, low_charging_voltage, low_resting_voltage or device_offline. Acknowledging an alert twice returns 409.