PixHub
Error Codes

Error Codes

The API uses two different JSON error shapes, depending on where the error originates.

Standard errors

Authentication, authorization, and rate-limit errors (401, 403, 429, 503) use a simple object with an error field:

{
  "error": "Human-readable error description."
}

404 and 422 responses do not use this shape — see below.

HTTP status codes

CodeNameWhen it occurs
200 OK Request processed successfully.
201 Created Upload succeeded; a new file was created.
401 Unauthorized The API key is missing or invalid. Check the X-Api-Key header.
403 Forbidden Account suspended, API access revoked, or the requester's IP is not on the allow list.
404 Not Found The requested slug doesn't exist or belongs to another account. The response body is {"message": "..."} (Laravel's default shape), not the error shape above — and may include the internal model class name.
422 Unprocessable Entity Validation failed - the file field is missing, the type isn't supported, or the size exceeds 200 MB. The response body contains message and an errors object.
429 Too Many Requests Rate limit exceeded. Honor the Retry-After header.
500 Internal Server Error An unexpected server error. If it persists, contact the support team.
503 Service Unavailable The API has been temporarily disabled. Retry after the Retry-After interval.

Validation errors (422)

When input validation fails, the response includes an errors map keyed by field name. Messages are always in English, regardless of the site's default locale — the API forces an English locale on every request:

{
  "message": "Câmpul file este obligatoriu.",
  "errors": {
    "file": [
      "Câmpul file este obligatoriu."
    ]
  }
}