# Responses

### API Standard Responses

Our success and error responses have a consistent structure so that **integrations to endpoints** only have a **binary** path. The response is either successful, or there was an error.

### Success

Our success responses will always be in the following format (unless explicitly documented differently on certain calls).

<table data-header-hidden><thead><tr><th width="188.45225446209741">Key</th><th>Type</th></tr></thead><tbody><tr><td><strong>Key</strong></td><td><strong>Type</strong></td></tr><tr><td><strong>header</strong></td><td>200 OK</td></tr><tr><td><strong>status</strong></td><td>String (success)</td></tr><tr><td><strong>data</strong></td><td>Array / Object / String (The endpoint response payload)</td></tr><tr><td><strong>hash</strong></td><td>String (A unique hash of the data response)</td></tr><tr><td><strong>response_time</strong></td><td>Float (How long the API call took in seconds)</td></tr></tbody></table>

### Handling a response example

Our recommended implementation of a response is shown in the following example (done in basic syntax for simplicity):

```
if (response.status == "success"){
 // Do something with the data
 let data = response.data;
}
else{
 // Something went wrong.
 console.log(response.message);
}
```

### Error

Our error responses will always contain a "message" and "status". Header errors follow standard set at <https://en.wikipedia.org/wiki/List_of_HTTP_status_codes>

| **Key** | **Type**                               |
| ------- | -------------------------------------- |
| header  | 400 - 500                              |
| status  | String (error)                         |
| message | String (A message detailing the error) |


---

# 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://everyday-digital.gitbook.io/falkor-dev-docs/overview/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.
