# Errors

## Validation Errors&#x20;

Validation errors occurs when one or more validation rules are not met. For example, not passing a required field in the body of a request this causes a 409 error&#x20;

`Status code : 409 - Conflict error` &#x20;

```
{
    "required field": [
        "error message"
    ]
}
```

## Authentication Errors &#x20;

Authentication errors occur when you fail to authenticate a request or pass the correct authentication key or when you pass in an invalid key. For example making a request without an authorization key.&#x20;

`Status code : 401 - unauthorized`&#x20;

```
{
    "description": "Please provide an auth token as part of the request.",
    "title": "Auth token required"
}
```

Another instance of authentication error is making a request with a key that doesn't have permission to perform that request.

`Status code : 403 forbidden` &#x20;

```
{
"message" :"error message"
}
```

## Other Errors

| Status Code | Description                                                                                                                 |
| ----------- | --------------------------------------------------------------------------------------------------------------------------- |
| 400         | The request could not be fulfilled because it already exists or is a bad request                                            |
| 404         | The request could not be fulfilled as the request resources does not exist.                                                 |
| 500, 501    | This request could not be completed quickly contact Sendbox if you encounter any of these response. it almost never happens |


---

# 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.sendbox.co/api/errors.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.
