# API Keys for Chat

## **Generating an API key from the Chat platform**

To authenticate requests to the Ebbot Chat API, you must generate an API key within the Ebbot Chat platform.

1. In the sidebar, go to **Settings** > **Integrations** > **API keys**.
2. Click the **New** button in the top-right corner.
3. Assign a **name** to the key and select an **expiration date.**
4. Click Save to create the key.

**Security & Storage** \
The full API key consists of a public key and a private key joined by a dot (e.g., `<public>.<secret>`). This full key will be displayed only once. Please save it securely immediately after generation.\
\
**Expiration & Lifecycle** \
The API key remains valid until the expiration date selected during creation. Once this date passes, the key will automatically stop functioning.

{% hint style="warning" %}
Creating keys without an expiration date is a security risk. If a permanent key is compromised, it allows unauthorized access indefinitely until manually revoked. We strongly recommend setting an expiration date to ensure regular key rotation.
{% endhint %}

## **Authentication**&#x20;

When making calls, include the full API key in the request header:

```http
x-api-key: <public-key>.<secret-key>
```


---

# 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.ebbot.ai/ebbot-docs/developer-resources/ebbot-chat/api-keys-for-chat.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.
