> For the complete documentation index, see [llms.txt](https://docs.kredibel.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kredibel.io/responses-and-errors.md).

# Responses & Errors

{% hint style="info" %}
Our API uses standard HTTP codes to indicate if the request is successful or failed
{% endhint %}

Successful requests will return both a `“message”` and `“data”` field with a 2XX status code. Data can be represented by an object or array type.

```
{
    "message": "Response message",
    "data": {
       # Response should be here
    }
}
```

```
{
    "message": "Response message",
    "data": [
       # Response should be here
    ]
}
```

Unsuccessful requests will return a “message” field containing the error message, with 4XX or 5XX status code.

**Common error message**

```
{
    "message": "Error message."
}
```

**Error message with error id**

{% hint style="info" %}
If you experience issues or errors while using our service, we highly recommend that you contact us by providing the **`errorId`** that you get along with the error message. That way, our team can easily trace the issue
{% endhint %}

```
{
    "errors": {
        "errorId": <log_id:uuid>
    },
    "message": "Error message."
}
```

**Error message with error type**

```
{
   "errors":{
      "errorId": <log_id:uuid>,
      "errorType": <error_type:str>
   },
   "message": "Error message."
}
```

**Validation error**

```
{
    "errors": {
        "fieldName": [
            "Unknown field."
        ]
    },
    "message": "Input payload validation failed."
}
```


---

# 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://docs.kredibel.io/responses-and-errors.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.
