# Common Error Codes

Generally speaking, codes in the 2xx range indicate that a request was successfully processed and codes in the 4xx range indicate that there was an error that resulted from the information provided (e.g., authentication, no balance or a missing or wrong parameter).

In case of an error, the body of the response includes a JSON formatted response that tells you exactly what is wrong.

**`HTTP Status Codes for API`**

| HTTP Status Codes                   | Description                               |
| ----------------------------------- | ----------------------------------------- |
| 200 Found                           | We found the requested resource           |
| 201 Created                         | The resource is successfully created      |
| 204 No Content                      | The requested resources are empty         |
| 401 Unauthorized                    | The access key was incorrect              |
| 404 Not found                       | The resources cannot be found             |
| 405 Method Not Allowed              | The method is not allowed                 |
| 408 Request Timeout                 | The request is taking too long to respond |
| 422 Unprocessable Entity            | The resource couldn't be created          |
| 5xx Something went wrong on our end | Please try again                          |

**`API specific Error Reason/status`**

| Error Code | Description         |
| ---------- | ------------------- |
| 10         | Request not allowed |
| 8          | Missing params      |
| 15         | Invalid params      |
| 40         | Not found           |
| 50         | Bad request         |
| 60         | Not enough balance  |
| 75         | API not found       |
| 99         | Internal error      |
| 101        | Service unavailable |
| 105        | Duplicate entry     |
| 125        | Ambiguous lookup    |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.localmail.io/reference/common-status-codes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
