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

# API Overview

> Programmatic access to the Turen platform

The Turen API lets you programmatically access your organization's data: agents, events, sessions, and policies.

## Base URL

```
https://api.prod.turen.io/api/v1
```

## Authentication

All API requests (except health check) require authentication via an API key in the `X-API-Key` header:

```bash theme={null}
curl -H "X-API-Key: sk_live_your_key_here" \
  https://api.prod.turen.io/api/v1/registered-agents
```

Create API keys in the dashboard under **Settings > API Keys**. See [Authentication](/api-reference/authentication) for details.

## Response Format

All responses are JSON. Successful responses return a `2xx` status code. Errors return `4xx` or `5xx` with a JSON body:

```json theme={null}
{
  "error": "Description of what went wrong"
}
```

## Pagination

List endpoints return paginated results wrapped in a `pagination` object:

```json theme={null}
{
  "data": [...],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 284,
    "has_more": true
  }
}
```

Use the `limit` and `offset` query parameters to page through results.

## Common Status Codes

| Code  | Meaning                                           |
| ----- | ------------------------------------------------- |
| `200` | Success                                           |
| `201` | Created                                           |
| `204` | No content (successful update/delete)             |
| `400` | Bad request: check your parameters                |
| `401` | Unauthorized: invalid or missing API key          |
| `403` | Forbidden: valid key but insufficient permissions |
| `404` | Not found                                         |
| `429` | Rate limited: slow down                           |
| `500` | Internal server error                             |

## Rate Limiting

API requests are rate limited per organization. Rate limit headers are included in every response:

```
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1708300000
Retry-After: 1
```

## Endpoints

| Group                                           | Description                          |
| ----------------------------------------------- | ------------------------------------ |
| [Authentication](/api-reference/authentication) | API key management and auth details  |
| [Agents](/api-reference/agents)                 | List and manage registered agents    |
| [Events](/api-reference/events)                 | Query security and LLM events        |
| [Sessions](/api-reference/sessions)             | List and retrieve session recordings |
| [Policies](/api-reference/policies)             | Read and update security policies    |
