Response status codes and how the API deals with errors
Meya uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx
range indicate success, codes in the 4xx
range indicate an error that failed given the information provided (e.g., a required parameter was omitted, your account isn't authorized, etc.), and codes in the 5xx
range indicate an error with Meya's servers (these are rare).
HTTP status code summary
Status code | Description |
---|---|
200 - OK | Everything worked as expected. |
201 - Created | Resource was successfully created. ex. create a new user |
202 - Accepted | Request was accepted, but not yet processed. ex. /receive |
204 - No content | Request was successful, but no response provided. ex. DELETE resource |
400 - Bad request | The request was unacceptable, often due to missing a required parameter. |
401 - Unauthorized | Unauthorized access to resource |
403 - Forbidden | Invalid api key or similar |
404 - Not Found | Resource doesn't exist |
409 - Conflict | The request conflicts with another request. Attempting to add the same user 2x for example. |
429 - Too many requests | Too many requests hit the API too quickly. We recommend an exponential backoff of your requests or upgrade to paid plan. |