# Responses

### Default Response

All responses will include either a success or an error.

<mark style="color:green;">**Success**</mark>

```json
{
    "success": true,
    "code": 200,
    "message": ""
}
```

<mark style="color:red;">**Error**</mark>

```json
{
    "success": false,
    "code": 404,
    "message": "Some error message here"
}
```

{% hint style="info" %}
All requests to the API will always have these 3 fields including the additional data for each endpoint you use.
{% endhint %}

### Example

This will be different for certain languages but should be the standard to use.

![](/files/br8pneVmK1lICu1QxM6n)\
The base class for all responses

![](/files/fDWcVWC56rybYpoRmXsT)\
Other responses should inherit or add the default response of success, code and message along with the endpoint data.\
\
It should look like

```json
{
    "success": true,
    "code": 200,
    "message": "",
    "r": 0,
    "g": 0,
    "b": 0,
    "name": "White",
    "hex": "#ffffff"
}
```


---

# 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.fluxpoint.dev/api/client/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.
