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

# API Overview

> Introduction to the ToeBox REST API

The ToeBox API lets you interact with your agents, chatbots, and analytics programmatically. Use it to send messages, manage agent configurations, and retrieve widget settings.

## Base URL

All API requests are made to your ToeBox instance:

```
https://your-store.toebox.ai/api
```

Replace `your-store` with your ToeBox subdomain (usually your Shopify shop name without `.myshopify.com`).

## Authentication

All API endpoints require authentication using your ToeBox API key. Include it as a Bearer token in the `Authorization` header:

```bash theme={null}
curl -X GET https://your-store.toebox.ai/api/agents \
  -H "Authorization: Bearer tb_your-api-key"
```

Find your API key in **Settings > API Keys** within the ToeBox dashboard.

<Warning>Keep your API key secret. Do not expose it in client-side code, public repositories, or browser-accessible files.</Warning>

## Response format

All responses are returned as JSON. Successful responses include the data directly:

```json theme={null}
{
  "agents": [
    {
      "id": "agent_abc123",
      "name": "Support Bot",
      "type": "customer_support",
      "status": "active"
    }
  ]
}
```

Error responses include an `error` field:

```json theme={null}
{
  "error": "Invalid API key",
  "status": 401
}
```

## Rate limits

API rate limits depend on your plan:

| Plan       | Requests per minute |
| ---------- | ------------------- |
| Free       | 20                  |
| Starter    | 60                  |
| Pro        | 200                 |
| Enterprise | Custom              |

Rate-limited requests return a `429 Too Many Requests` status code with a `Retry-After` header.

## Available endpoints

<CardGroup cols={2}>
  <Card title="Chat" icon="comments" href="/api-reference/endpoint/chat">
    Send messages to your agents and receive streaming responses.
  </Card>

  <Card title="Agents" icon="robot" href="/api-reference/endpoint/agents">
    List and create agent configurations.
  </Card>

  <Card title="Widget Config" icon="window" href="/api-reference/endpoint/widget-config">
    Retrieve chatbot widget configuration for embedding.
  </Card>

  <Card title="Authentication" icon="key" href="/api-reference/authentication">
    Learn how to authenticate and manage API keys.
  </Card>
</CardGroup>
