Update device settings
Rate limit 5 requests/min (sensitive)
const url = 'https://app.ridebox.my/api/devices/YOUR_DEVICE_UUID/settings';const options = { method: 'PATCH', headers: { 'X-API-Version': 'v1', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"heartbeat_s":600,"geofence":{"lat":1.4927,"lng":103.7414,"radius_m":75}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://app.ridebox.my/api/devices/YOUR_DEVICE_UUID/settings \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-API-Version: v1' \ --data '{ "heartbeat_s": 600, "geofence": { "lat": 1.4927, "lng": 103.7414, "radius_m": 75 } }'Changes the desired configuration and queues a config command to deliver it, so the response is that command. Poll the command to see whether the device accepted it.
Only keys present in the body change. A present wifi replaces the whole list, up to 5 networks. An out-of-range value fails the whole request with 422.
Sensitive tier: 5 requests/min per user.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The device uuid.
Example
YOUR_DEVICE_UUIDHeader Parameters
Section titled “ Header Parameters ”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
v1Request Bodyrequired
Section titled “ Request Bodyrequired ”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
Example
30000Example
900Example
13.2Example
12.2A circular geofence with a radius between 20 m and 5,000 m.
object
Example
1.4927Example
103.7414Example
50object
Example
HomeWiFiThe network password. Write-only: delivered to the device, never stored and never returned.
Example
YOUR_WIFI_PASSWORDResponses
Section titled “ Responses ”A config command was queued.
object
A queued device command. status is always present.
object
The command UUID. Use it to poll the command.
The command type. ota appears in command history but cannot be queued through this API.
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.
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.
When the command was sent. Null while status is pending.
When the device acknowledged the command. Null until then.
ok or err. Null until the device acknowledges the command.
A short reason from the device. Null unless result is err.
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 }}Headers
Section titled “ Headers ”The API version that served this response. Always v1 on this surface.
Example
v1Requests permitted in the current window for the applicable tier.
Example
120Requests remaining in the current window.
Example
0Missing, invalid, expired or revoked token. When a token was presented, code tells an expired token from a revoked one.
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
Human-readable, safe to display to the end user.
Present only on 422. Field name to array of messages.
object
Tells an expired token, which you can replace by signing in again, from a revoked one.
Examples
No token presented
{ "message": "Unauthenticated."}Token past its 30-day expiry
{ "message": "Your session has expired. Please sign in again.", "code": "token_expired"}Token revoked server-side
{ "message": "Your session is no longer valid. Please sign in again.", "code": "token_revoked"}Headers
Section titled “ Headers ”The API version that served this response. Always v1 on this surface.
Example
v1Not found, or owned by another account. The two cases are deliberately indistinguishable.
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
Human-readable, safe to display to the end user.
Present only on 422. Field name to array of messages.
object
Tells an expired token, which you can replace by signing in again, from a revoked one.
Example
{ "message": "Not found."}Headers
Section titled “ Headers ”The API version that served this response. Always v1 on this surface.
Example
v1Validation failed. errors is keyed by field name.
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
Human-readable, safe to display to the end user.
Present only on 422. Field name to array of messages.
object
Tells an expired token, which you can replace by signing in again, from a revoked one.
Example
{ "message": "The given data was invalid.", "errors": { "email": [ "The email field is required." ] }}Headers
Section titled “ Headers ”The API version that served this response. Always v1 on this surface.
Example
v1Rate limited. Back off and honour Retry-After.
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
Human-readable, safe to display to the end user.
Present only on 422. Field name to array of messages.
object
Tells an expired token, which you can replace by signing in again, from a revoked one.
Example
{ "message": "Too many requests. Please try again shortly."}Headers
Section titled “ Headers ”Seconds to wait before retrying.
Example
42Requests permitted in the current window for the applicable tier.
Example
120Requests remaining in the current window.
Example
0Unix timestamp at which the current window resets. Sent on 429.
Example
1789180500The API version that served this response. Always v1 on this surface.
Example
v1