Developers
Errors
Every API response has the same shape: success, data, error and meta. On an error, data is null and error holds a stable code and a message explaining it.
{
"success": false,
"data": null,
"error": {
"code": "validation_failed",
"message": "The request contains invalid fields.",
"details": [
{
"field": "observations.0.latitude",
"code": "out_of_range",
"message": "This value is out of range."
}
]
},
"meta": {
"request_id": "my-request-0001",
"timestamp": "2026-10-18T09:00:01Z"
}
}
Messages are in English, or in Arabic when you send Accept-Language: ar. Rely on the code in your program, not the message text.
Send an X-Request-Id header with your own identifier; it comes back in meta.request_id to help trace the request when you contact us.
Some errors, such as 409 conflict, add error.reason: a short fixed word in English that names the rule that refused the request, for example stale or trip_state. Use it in your program like the code. It is not shown to people, and new words may appear, so treat a word you do not know as the general case.
Error codes
| Code | HTTP status | Message |
|---|---|---|
invalid_json | 400 | The request body is not valid JSON. |
bad_request | 400 | The request is malformed. |
unauthenticated | 401 | Authentication is required. |
forbidden | 403 | This action is not allowed. |
plan_feature_required | 403 | Your plan does not include the feature this request needs. |
https_required | 403 | HTTPS is required. |
not_found | 404 | The resource was not found. |
method_not_allowed | 405 | The method is not allowed. |
idempotency_conflict | 409 | The idempotency key was already used with a different body. |
conflict | 409 | The request conflicts with the current state of the resource. |
payload_too_large | 413 | The request body is too large. |
unsupported_media_type | 415 | The request body must be application/json. |
validation_failed | 422 | The request contains invalid fields. |
batch_too_large | 422 | The batch is empty or has more observations than allowed. |
rate_limited | 429 | Too many requests. Retry after the indicated time. |
internal_error | 500 | An unexpected error occurred. |
service_unavailable | 503 | The service is temporarily unavailable. Retry later. |
Field detail codes
On validation errors, error.details lists each wrong field with its location (field), code and message.
| Code | Message |
|---|---|
required | This field is required. |
invalid_type | This field has the wrong type. |
out_of_range | This value is out of range. |
too_long | This value is too long. |
invalid_format | This value has an invalid format. |
naive_timestamp | The timestamp must include a UTC offset or Z. |
unknown_value | This value is not allowed. |
mutually_exclusive | Send only one of these fields. |
unit_mismatch | The unit differs from the unit declared for the source. |