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

# API Reference

> Complete REST API reference for the thinnestAI platform.

## Base URL

```
https://api.thinnest.ai
```

## Authentication

All API endpoints require a Bearer token in the `Authorization` header:

```bash theme={null}
curl -H "Authorization: Bearer YOUR_TOKEN" https://api.thinnest.ai/v2/agents
```

See [Authentication](/api-reference/auth) for details on obtaining tokens.

## Response Format

All responses return JSON:

```json theme={null}
{
  "data": { ... },
  "message": "Success",
  "status": 200
}
```

Error responses:

```json theme={null}
{
  "detail": "Error description",
  "status": 400
}
```

## HTTP Status Codes

| Code  | Description                             |
| ----- | --------------------------------------- |
| `200` | Success                                 |
| `201` | Created                                 |
| `400` | Bad Request — invalid parameters        |
| `401` | Unauthorized — missing or invalid token |
| `403` | Forbidden — insufficient permissions    |
| `404` | Not Found — resource doesn't exist      |
| `429` | Too Many Requests — rate limit exceeded |
| `500` | Internal Server Error                   |

## Rate Limits

| Endpoint         | Limit               |
| ---------------- | ------------------- |
| Chat endpoints   | 60 requests/minute  |
| API endpoints    | 120 requests/minute |
| Knowledge upload | 10 uploads/hour     |

Rate limit headers are included in every response:

```
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1709654400
```

## Interactive Playground

Each endpoint page includes an interactive playground where you can test API calls directly from the browser. Enter your base URL and Bearer token to get started.

<Cards>
  <Card title="Agents" href="/api-reference/agents/list" />

  <Card title="Chat" href="/api-reference/chat/send" />

  <Card title="Voice Calls" href="/api-reference/voice-calls/outbound" />

  <Card title="Knowledge" href="/api-reference/knowledge/add-file" />

  <Card title="Campaigns" href="/api-reference/campaigns/list" />

  <Card title="Authentication" href="/api-reference/auth" />
</Cards>
