> For the complete documentation index, see [llms.txt](https://doc.auditx.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.auditx.net/auditx-educational-program/introduction/api-reference/error-codes.md).

# Error Codes

**Error Codes**

When using the API, you might encounter error codes if something goes wrong with your request. Understanding these error codes will help you troubleshoot issues more efficiently.

1. **400 Bad Request**
   * **Cause**: There may be missing or incorrect parameters in your request.
   * **Solution**: Double-check all required fields and ensure your data is correctly formatted.
2. **401 Unauthorized**
   * **Cause**: Your API key is missing or invalid.
   * **Solution**: Ensure the `Authorization` header includes a valid API key in the format `Bearer YOUR_API_KEY`.
3. **403 Forbidden**
   * **Cause**: Your API key lacks the necessary permissions for this action.
   * **Solution**: Verify the permissions associated with your API key. You may need to update permissions or use a key with higher access.
4. **404 Not Found**
   * **Cause**: The endpoint or resource you’re trying to access doesn’t exist.
   * **Solution**: Confirm the endpoint URL and ensure any IDs (like `audit_id`) are correct.
5. **429 Too Many Requests**
   * **Cause**: You have exceeded the rate limit for API requests.
   * **Solution**: Wait a moment and try again. Consider implementing request throttling in your integration.
6. **500 Internal Server Error**
   * **Cause**: There is an issue on AuditX’s end, possibly due to server maintenance or an unexpected error.
   * **Solution**: Wait and try again. If the issue persists, contact AuditX’s support.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://doc.auditx.net/auditx-educational-program/introduction/api-reference/error-codes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
