> For the complete documentation index, see [llms.txt](https://docs.athenachat.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.athenachat.ai/api-reference/en/readme.md).

# Overview

Connect your own systems to Athena AI — send messages to your AI agent, manage chats and receive events

The Athena AI API lets your own software work with the chats your AI agents handle. You can:

* **Connect your own channel.** Send customer messages from your app, website or call center to an AI agent and get its replies back through a webhook. See [Connect your system via the API channel](/api-reference/en/guides/api-channel.md).
* **Receive events from any channel.** Get new messages, completed tasks and status changes from Telegram, WhatsApp, Instagram, Facebook, the Chat Widget and the API channel. See [Webhooks](/api-reference/en/guides/webhooks.md).
* **Manage chats.** List chats, mark them as read or unread, set the task status, block spam and organize chats with tags. See [Chats](/api-reference/en/endpoints/chats.md) and [Tags](/api-reference/en/endpoints/tags.md).
* **Train your agent.** Rate agent replies and send corrected answers to the knowledge base. See [Answer feedback](/api-reference/en/endpoints/answer-feedback.md).

***

## Base URL

```
https://hub.athenachat.ai/api/v1
```

All requests use HTTPS. Responses are JSON, and timestamps are in ISO 8601 format, in UTC.

## Quick start

**Step 1.** Get an API key — see [Authentication](/api-reference/en/authentication.md).

**Step 2.** Check the key by requesting your latest chats:

```bash
curl "https://hub.athenachat.ai/api/v1/chats/chat?limit=5" \
  -H "Authorization: YOUR_API_KEY"
```

**Result:** a JSON object with your chats and their total count.

***

## Chat identifiers

Every chat has two identifiers. Endpoints say which one they expect.

| Identifier | Example                                          | Used by                                                                                            |
| ---------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------- |
| `id`       | `a646fb76-3675-4451-9b92-d85863e4e2a1`           | Read and unread, task status, tags                                                                 |
| `uniqueId` | `348148573_0252558b-0280-4db0-a159-734e1821fcac` | Ban and unban; it is also the chat key in [webhook](/api-reference/en/guides/webhooks.md) payloads |

You get both from the [chat list](/api-reference/en/endpoints/chats.md#list-chats) and from every [webhook](/api-reference/en/guides/webhooks.md) payload (`chat.id` and `chat.uniqueId`).

## Request rules

* `GET` and `DELETE` endpoints take their parameters in the query string; `POST` endpoints take a JSON body (or `multipart/form-data` when you upload files).
* Unknown parameters are rejected with `400 Bad Request`, so send only the parameters described for each endpoint.
* New fields can be added to responses at any time. Ignore fields you don't use.

## OpenAPI specification

Import the specification into Postman, Insomnia or a code generator:

{% file src="/files/la8lkARhcVWr2xd8nEuO" %}
OpenAPI 3.0 specification of the Athena AI public API
{% endfile %}

## Need help?

Write to <info@athenachat.ai> or message us on [WhatsApp](https://wa.me/447473396460).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.athenachat.ai/api-reference/en/readme.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
