Azuga uses uses conventional HTTP Response Codes to indicate the success or failure of an API request.

Codes in the 2xx range indicate success.
Codes in the 4xx range signal that the client's request was incorrect. This could be due to missing parameters, invalid data, or incorrect syntax. Please review and modify the request before attempting to resend it.
Codes in the 5xx range indicate an error with Azuga's servers (these are rare).

HTTP Status Code Reference:

CodeMessageDescription
200OKSuccess, everything worked as expected.
201CreatedSuccess, new resource created.
400Bad RequestYour request could not be understood by the server.
401UnauthorizedNo valid API key provided, or you have used the wrong API key
402Request FailedThe parameters were valid but hte request failed.
403ForbiddenThe API key doesn't have the permissions to perform the request.
404Not FoundThe specified or requested resource could not be found.
429Too many requestsToo many requests hit the API too quickly.
500, 502, 503, 504Server ErrorsSomething went wrong on Azuga's end. (These are rare)

While we've documented common error formats, our API may return additional error responses. For robust error handling, please always inspect the content of the JSON response body.

All errors will return a JSON blob in the following format:

{
  generatedAt: 1681072293000,
  errorMessage: UNAUTHORIZED,
  description: "User is not Authorized. Ensure that the authorization header in your request is included and valid."
}
{
  "generatedAt": 1681072293000,
  "errorMessage": INVALID-REQUEST,
  "description": "Request is not well-formed, syntactically incorrect, or violates schema.",
  "errorDetails": [
    {
      "field": "userId",
      "description": "Required input parameter is missing or invalid. should be a string in a  valid UUID format.",
      "code": "AZGUM-001"
    }
  ]
}