# API Responses

XCover uses conventional HTTP response codes to indicate the success or failure of API requests. Error codes ranging from 200 to 299 indicate successful operations. Error codes ranging from 400 to 499 represent various error codes. Errors that can be resolved programmatically will result in an error code that briefly explains the error type and the reason for failure. 5xx codes indicate an unexpected error within the XCover application. In the unlikely event of a 5xx error, our engineering team will automatically receive a notification and will fix the issue as fast as possible.

| Status                             | Description                                                                                       |
| ---------------------------------- | ------------------------------------------------------------------------------------------------- |
| 200 - OK                           | Everything worked as expected                                                                     |
| 201 - Created                      | The request has been fulfilled and has resulted in one or more new resources being created        |
| 400 - Bad Request                  | The request was not accepted, often due to the wrong format of the request                        |
| 401 - Unauthorized                 | No valid API key was provided                                                                     |
| 404 - Not Found                    | The requested resource doesn't exist                                                              |
| 409 - Conflict                     | The request conflicts with another request, perhaps due to the usage of the same idempotency key  |
| 422 - Unprocessable Entity         | Validation failed or logical error                                                                |
| 429 - Too Many Requests            | Too many requests hit the API too quickly. We recommend an exponential back-off of your requests. |
| 500, 502, 503, 504 - Server Errors | Something went wrong on XCover side                                                               |


---

# 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.covergenius.com/xcover/responses.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.
