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

# API Overview

> Introduction to the IllumiChat API

The IllumiChat API lets you manage assistants, conversations, contacts, tickets, and more. All endpoints follow REST conventions and return JSON responses.

## Base URL

```
https://app.illumichat.com/api
```

## Request Format

* Use `Content-Type: application/json` for request bodies
* Include authentication credentials with every request (see [Authentication](/api/authentication))
* URL path parameters are denoted with `{paramName}` in the endpoint documentation

### Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET https://app.illumichat.com/api/assistants \
    -H "Authorization: Bearer <your-token>" \
    -H "Content-Type: application/json"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://app.illumichat.com/api/assistants", {
    headers: {
      Authorization: "Bearer <your-token>",
      "Content-Type": "application/json",
    },
  });

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://app.illumichat.com/api/assistants",
      headers={
          "Authorization": "Bearer <your-token>",
          "Content-Type": "application/json",
      },
  )

  data = response.json()
  ```
</CodeGroup>

## Response Format

All successful responses return JSON. The structure depends on the endpoint:

```json theme={null}
// Single resource
{
  "id": "abc123",
  "name": "My Assistant",
  "createdAt": "2025-01-15T10:30:00Z"
}

// Collection
[
  { "id": "abc123", "name": "Assistant A" },
  { "id": "def456", "name": "Assistant B" }
]
```

Error responses use a consistent format described in [Errors & Status Codes](/api/errors).

## Authentication Methods

| Method               | Use Case              | Details                             |
| -------------------- | --------------------- | ----------------------------------- |
| **Session cookie**   | Browser-based apps    | Set automatically after Auth0 login |
| **Bearer token**     | Server-to-server      | Pass in `Authorization` header      |
| **Public (no auth)** | Widget & SMS webhooks | Rate-limited by IP or assistant     |

See [Authentication](/api/authentication) for full details.

## API Sections

<CardGroup cols={2}>
  <Card title="Authentication" icon="lock" href="/api/authentication">
    Session cookies, API keys, and public endpoints.
  </Card>

  <Card title="Errors & Status Codes" icon="circle-exclamation" href="/api/errors">
    Error format, HTTP codes, and handling patterns.
  </Card>

  <Card title="Rate Limiting" icon="gauge-high" href="/api/rate-limiting">
    Request limits, widget quotas, and backoff strategies.
  </Card>

  <Card title="Endpoint Reference" icon="code" href="/api/authentication">
    Browse individual endpoint documentation generated from the OpenAPI spec.
  </Card>
</CardGroup>

## Key Endpoint Groups

| Group          | Base Path                   | Description                              |
| -------------- | --------------------------- | ---------------------------------------- |
| **Assistants** | `/api/assistants`           | Create, update, and manage AI assistants |
| **Chat**       | `/api/chat`                 | Send messages and stream responses       |
| **Projects**   | `/api/projects`             | Manage projects and documents for RAG    |
| **Contacts**   | `/api/contacts`             | Create and manage contacts               |
| **Tickets**    | `/api/tickets`              | Support ticket lifecycle                 |
| **Widget**     | `/api/widget/{assistantId}` | Public widget endpoints                  |
| **SMS**        | `/api/sms`                  | Twilio webhook endpoints                 |
| **Webhooks**   | `/api/webhooks`             | Manage webhook subscriptions             |

<Tip>
  The full OpenAPI specification is available and powers the auto-generated endpoint pages in this documentation. You can also download it for use with tools like Postman or code generators.
</Tip>
