Skip to content

Examples

Set these first, using your own values.

Terminal window
export RIDEBOX_API="https://app.ridebox.my/api"
export RIDEBOX_TOKEN="YOUR_TOKEN"
Terminal window
curl "$RIDEBOX_API/devices" \
-H "Authorization: Bearer $RIDEBOX_TOKEN" -H "Accept: application/json"
Terminal window
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.

Commands are asynchronous. A 202 means the command was accepted, not that the bike acted on it.

Terminal window
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.

Terminal window
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.

Send only the settings you want to change. This queues a change to the bike.

Terminal window
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
Terminal window
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"
Terminal window
curl "$RIDEBOX_API/ride-sessions/YOUR_RIDE_UUID/gpx" \
-H "Authorization: Bearer $RIDEBOX_TOKEN" \
-o ride.gpx
Terminal window
curl "$RIDEBOX_API/alerts?acknowledged=false&type=tamper" \
-H "Authorization: Bearer $RIDEBOX_TOKEN" -H "Accept: application/json"
Terminal window
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.