> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jelou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Getting started guide for the Jelou API

Jelou API is a powerful tool for companies to communicate more professionally and efficiently with their customers through chatbots. It enables the creation of complex, interconnected systems, integrating seamlessly with the Jelou platform, external services, and other systems.

Based on REST principles, it facilitates collaboration and information exchange, personalizing messages, maintaining user context, and saving chat history.

In practical terms, the Jelou API allows chatbots to communicate with other systems, facilitating collaboration, information exchange, and the execution of various tasks, such as personalizing messages, maintaining user context, or ensuring continuity by saving chat history. This is crucial for developing modern, interconnected applications, enabling a better user experience and multi-turn conversations.

The API will always respond with an object and, depending on the context, resources may respond with a simple object or an array of objects.

<Note>
  This API accepts request bodies in JSON format and requires the content to include the `Content-Type: application/json` header. This header must be specified in every request.
</Note>

## Domain

The Jelou API is available at the following domain:

```
https://api.jelou.ai
```

***

## Authentication

Clients using this API will receive a `client ID` and a `client secret key` for basic authentication.

For any API endpoint, the following header must be added:

```
Authorization: Basic <Base64 encoded clientId:clientSecret>
```

### Example

If your `clientId` is `my_client_id` and your `clientSecret` is `my_client_secret`:

1. Join them with a colon: `my_client_id:my_client_secret`
2. Encode it in Base64: `bWlfY2xpZW50X2lkOm1pX2NsaWVudF9zZWNyZXQ=`
3. Include it in the header: `Authorization: Basic bWlfY2xpZW50X2lkOm1pX2NsaWVudF9zZWNyZXQ=`

***

## Errors

Jelou uses HTTP standards to report errors. In general:

* **2XX codes** indicate success.
* **4XX codes** indicate client errors.
* **5XX codes** indicate server errors.

When an error occurs, the response includes a JSON object with a `code` and a detailed `description` of the problem.

### Error codes

| Code                             | HTTP Status Code | Description                                                |
| -------------------------------- | ---------------- | ---------------------------------------------------------- |
| `bot_not_found`                  | 404              | The company does not have permission to use this bot.      |
| `forbidden_bot`                  | 403              | You do not have permission to use this bot.                |
| `message_could_not_be_send`      | 400              | The message could not be sent due to a bad request.        |
| `notification_could_not_be_send` | 400              | The notification could not be sent due to a bad request.   |
| `unauthorized`                   | 401              | You are not authorized to perform this request.            |
| `unprocessable_entity`           | 422              | A field is missing or there is an error in the request.    |
| `internal_server_error`          | 500              | The authorization token does not have an assigned company. |

***

## Rate limits

The API has a limit of **5 requests per second**.
