Skip to content

Errors

Fleet uses standard HTTP status codes: 2xx succeeded, 4xx means the request needs to change, 5xx means something went wrong on our side.

Error bodies are RFC 9457 problem details, sent as application/problem+json:

{
"type": "https://developers.get-fleet.com/errors/validation_failed",
"title": "Validation failed",
"status": 400,
"code": "validation_failed",
"detail": "2 parameters are invalid.",
"instance": "/v1/fuel_logs",
"request_id": "req_7Hx2mQ9vLk3Pz8Rt1Ws4Yb6N",
"param": "vehicle_id",
"errors": [
{ "param": "vehicle_id", "code": "invalid_format", "message": "Invalid UUID" },
{ "param": "quantity", "code": "invalid_union", "message": "Expected a decimal number" }
]
}
  • Branch on code: it is stable. detail is for people and may change.
  • param names the field at fault; errors lists every invalid field on validation_failed.
  • type links to the page for that error, with advice.
  • Log request_id; it identifies the call in your request log and for support.
Status Retry?
400, 401, 403, 404, 412, 415, 422 No. Fix the request first.
409 duplicate_resource No. The object exists; look it up and update it.
409 resource_in_use No. Other records still refer to the object you tried to delete.
409 idempotency_request_in_progress Yes, after a moment, with the same Idempotency-Key.
429 Yes, after Retry-After seconds.
500, 503, network errors and timeouts Yes, with exponential backoff and the same Idempotency-Key.

A good default: retry up to 5 times, waiting 0.5 s, 1 s, 2 s, 4 s and 8 s plus random jitter, always reusing the idempotency key of the original request.

StatusCodeMeaning
401authentication_requiredThe request had no API key. Send it as Authorization: Bearer flt_….
401invalid_api_keyThe API key is malformed, unknown, or belongs to the other environment (live vs test).
401api_key_revokedThe API key was revoked in Settings → Developers.
401api_key_expiredThe API key passed its expiry date. Create or roll a key.
403ip_not_allowedThe key has an IP allowlist and the request came from an address outside it.
403insufficient_scopeThe API key lacks the scope this endpoint needs. The required_scope field names it.
403permission_deniedThe organization's "API integrations" role does not allow this action. An admin can change it in Settings → Roles.
400invalid_jsonThe request body is not valid JSON.
400validation_failedOne or more parameters are missing or invalid. errors lists each one.
400unsupported_versionThe Fleet-Version header names a version this API does not serve.
404resource_not_foundNo object with that id exists in your organization.
404route_not_foundNo endpoint matches this method and path.
409duplicate_resourceAn object with the same unique value (for example a vehicle number) already exists.
409resource_in_useOther records still refer to this object (for example fuel logs that name this vendor), so it cannot be deleted.
409invalid_stateThe object is not in a state that allows this action (for example approving a request that was never submitted).
409idempotency_request_in_progressA request with this Idempotency-Key is still being processed. Retry shortly.
412precondition_failedThe object changed since you read it: its ETag no longer matches If-Match. Fetch it again and retry.
413payload_too_largeThe request body exceeds 1 MB, or 10 MB for a file upload.
415unsupported_media_typeSend request bodies as application/json.
422reference_not_foundAn id in the request (for example vehicle_id) does not exist in your organization.
422idempotency_key_reusedThis Idempotency-Key was already used with a different request body or path in the last 24 hours.
429rate_limitedToo many requests for this API key. Wait for the number of seconds in Retry-After.
500internal_errorSomething went wrong on our side. Retrying with the same Idempotency-Key is safe.
503service_unavailableThe API is temporarily unavailable. Retry with exponential backoff.