Skip to main content

Response codes

Learn about the response status codes you can expect when interacting with the Onna API.

HTTP response status codes indicate the result of your HTTP requests to the API.

The Onna API uses a defined set of response status codes. The goal is to make your interaction with the API more predictable and to let you understand when your request is successful. Or, when it's not, to help you recover from the error.


Our response status codes are based on the official set of status codes provided by the Mozilla Developer Network (MDN). You can find the full list of response status codes on MDN's website.

Codes consist of 3 digits. The first digit defines the code group, which conveys preliminary info about the success or failure of the request.

2xx codes

Codes returned in the 2xx range represent a successful completion of your request.

200OKThe request was successful.
201CreatedResponse code indicates that the request has succeeded and has led to the creation of a resource.
202AcceptedThe server accepted the request. Processing may still be completed later.

3xx codes

304Not ModifiedThe response has not been modified. It is an implicit redirection to a cached resource.

4xx codes

Codes returned in the 4xx range represent errors caused by an issue with how the request is done or by the information contained in it. For example, omitted parameters or lack of authorization.

Codes in this range can be often handled programmatically thanks to the information contained in the error.

400Bad requestThe server cannot process this request because of its incorrect syntax or format.
401UnauthorizedYou are not authorized to access the requested resource. Check your credentials or renew your token.
403ForbiddenYou are not allowed to access the requested resource. Try double-checking your permissions.
404Not foundWe couldn't find the resource you requested. It may have been moved, deleted, or there's a typo in the URL.
405Method not allowedThe method used in the request is not allowed by this endpoint. Try a different method.
412Preconditions failedThe request preconditions don't allow access to the target resource.
415Unsupported media typeThe server doesn't support the payload's format and cannot accept the request. This is often related to the format indicated in the Content-Type header.
422Unprocessable entityThe syntax and content type of the request are correct, but the serve was unable to process the instructions.
429Too many requestsToo many requests were sent to our server. Try again later.

5xx codes

Codes returned in the 5xx range represent an error in our servers. The solution to these errors is often trying again later or, if the issue persists, contacting your Onna representative.

500Internal server errorThe server had an unexpected issue and couldn't process your request. If the issue persists, contact your Onna representative.
502Bad gatewayThe server had an unexpected response while trying to communicate with an upstream server.
503Service unavailableThe server cannot handle the request. It may be down for maintenance or overloaded. If the issue persists, contact your Onna representative.