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

# Overview

> Welcome to the Doppel API documentation

# Doppel API

The Doppel API provides programmatic access to your interaction data, metrics, campaigns, and clinic information. Use it to build integrations, generate reports, or power your own dashboards.

## What you can do

<CardGroup cols={2}>
  <Card title="Interactions" icon="phone" href="/api-reference/interactions/list-interactions">
    Access call and WhatsApp conversation data with powerful filtering options.
  </Card>

  <Card title="Metrics" icon="chart-line" href="/api-reference/metrics/summary">
    Get aggregated KPIs, outcome breakdowns, and daily time series data.
  </Card>

  <Card title="Campaigns" icon="bullhorn" href="/api-reference/campaigns/list-campaigns">
    Retrieve campaign information and performance data.
  </Card>

  <Card title="Clinics" icon="hospital" href="/api-reference/clinics/list-clinics">
    List all clinics associated with your account.
  </Card>
</CardGroup>

## Base URL

All API requests should be made to:

```
https://api.getdoppel.ai/api/v1
```

## Response Format

All responses follow a consistent JSON format:

```json theme={null}
{
  "success": true,
  "data": { ... },
  "meta": {
    "page": 1,
    "limit": 25,
    "total": 100,
    "total_pages": 4,
    "has_more": true
  },
  "request_id": "550e8400-e29b-41d4-a716-446655440000",
  "timestamp": "2024-01-15T10:30:00.000Z"
}
```

## Error Handling

When an error occurs, the response will include an error object:

```json theme={null}
{
  "success": false,
  "data": null,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid query parameters",
    "details": { ... }
  },
  "request_id": "550e8400-e29b-41d4-a716-446655440000",
  "timestamp": "2024-01-15T10:30:00.000Z"
}
```

### Error Codes

| Code               | HTTP Status | Description                             |
| ------------------ | ----------- | --------------------------------------- |
| `UNAUTHORIZED`     | 401         | Missing or invalid Authorization header |
| `INVALID_API_KEY`  | 401         | The API key is invalid                  |
| `API_KEY_EXPIRED`  | 401         | The API key has expired                 |
| `FORBIDDEN`        | 403         | The API key lacks required permissions  |
| `RATE_LIMITED`     | 429         | Rate limit exceeded                     |
| `VALIDATION_ERROR` | 400         | Invalid request parameters              |
| `NOT_FOUND`        | 404         | Resource not found                      |
| `INTERNAL_ERROR`   | 500         | Internal server error                   |
