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.
Status | Text | Description |
---|---|---|
200 | OK | The request was successful. |
201 | Created | Response code indicates that the request has succeeded and has led to the creation of a resource. |
202 | Accepted | The server accepted the request. Processing may still be completed later. |
3xx codes
Status | Text | Description |
---|---|---|
304 | Not Modified | The 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.
Status | Text | Description |
---|---|---|
400 | Bad request | The server cannot process this request because of its incorrect syntax or format. |
401 | Unauthorized | You are not authorized to access the requested resource. Check your credentials or renew your token. |
403 | Forbidden | You are not allowed to access the requested resource. Try double-checking your permissions. |
404 | Not found | We couldn't find the resource you requested. It may have been moved, deleted, or there's a typo in the URL. |
405 | Method not allowed | The method used in the request is not allowed by this endpoint. Try a different method. |
412 | Preconditions failed | The request preconditions don't allow access to the target resource. |
415 | Unsupported media type | The 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. |
422 | Unprocessable entity | The syntax and content type of the request are correct, but the serve was unable to process the instructions. |
429 | Too many requests | Too 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.
Status | Text | Description |
---|---|---|
500 | Internal server error | The server had an unexpected issue and couldn't process your request. If the issue persists, contact your Onna representative. |
502 | Bad gateway | The server had an unexpected response while trying to communicate with an upstream server. |
503 | Service unavailable | The server cannot handle the request. It may be down for maintenance or overloaded. If the issue persists, contact your Onna representative. |