> ## 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.

# List Interactions

> Retrieve a paginated list of all interactions (calls and conversations)

# List Interactions

Returns a paginated list of all interactions, including both voice calls and WhatsApp conversations. Use query parameters to filter, sort, and paginate results.

## Request

```bash theme={null}
GET https://api.getdoppel.ai/api/v1/interactions
```

### Headers

| Header          | Required | Description                    |
| --------------- | -------- | ------------------------------ |
| `Authorization` | Yes      | Bearer token with your API key |

### Query Parameters

| Parameter   | Type    | Default | Description                                                                                       |
| ----------- | ------- | ------- | ------------------------------------------------------------------------------------------------- |
| `page`      | integer | 1       | Page number (1-indexed)                                                                           |
| `limit`     | integer | 25      | Items per page (max: 500)                                                                         |
| `date_from` | string  | -       | Start date (ISO 8601)                                                                             |
| `date_to`   | string  | -       | End date (ISO 8601)                                                                               |
| `channel`   | string  | -       | Filter by channel: `voice` or `whatsapp`                                                          |
| `type`      | string  | -       | Filter by interaction type (see below)                                                            |
| `outcome`   | string  | -       | Filter by outcome (comma-separated for multiple, e.g., `APPOINTMENT_BOOKED,APPOINTMENT_MODIFIED`) |
| `clinic_id` | string  | -       | Filter by clinic UUID                                                                             |
| `search`    | string  | -       | Search in phone numbers (partial match, e.g., `555` matches `+1-555-123-4567`)                    |

### Interaction Types

#### Voice Call Types

| Type                | Description                                  |
| ------------------- | -------------------------------------------- |
| `INBOUND`           | Incoming calls from patients                 |
| `FORM_OUTBOUND`     | Outbound calls triggered by form submissions |
| `CAMPAIGN_OUTBOUND` | Outbound calls from campaigns                |
| `CAMPAIGN_CALLBACK` | Callback calls from campaigns                |

#### WhatsApp Conversation Types

| Type                   | Description                   |
| ---------------------- | ----------------------------- |
| `INBOUND`              | Incoming WhatsApp messages    |
| `CAMPAIGN_OUTBOUND`    | Outbound campaign messages    |
| `APPOINTMENT_REMINDER` | Appointment reminder messages |

## Response

<ResponseField name="success" type="boolean">
  Whether the request was successful
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="interactions" type="array">
      Array of interaction objects
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="meta" type="object">
  Pagination metadata
</ResponseField>

### Interaction Object

Each interaction contains:

| Field              | Type    | Description                                                    |
| ------------------ | ------- | -------------------------------------------------------------- |
| `id`               | string  | Unique interaction ID                                          |
| `channel`          | string  | `voice` or `whatsapp`                                          |
| `type`             | string  | Interaction type                                               |
| `direction`        | string  | `inbound` or `outbound`                                        |
| `phone_number`     | string  | Patient phone number                                           |
| `clinic_id`        | string  | Associated clinic UUID                                         |
| `started_at`       | string  | When the interaction started (ISO 8601)                        |
| `ended_at`         | string  | When the interaction ended (ISO 8601)                          |
| `duration_seconds` | integer | Duration in seconds (calls only)                               |
| `outcome`          | string  | Classification outcome (UPPERCASE, e.g., `APPOINTMENT_BOOKED`) |
| `transcript`       | array   | Conversation transcript                                        |
| `summary`          | string  | AI-generated summary                                           |
| `recording_url`    | string  | Call recording URL (calls only)                                |

## Examples

### Basic Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.getdoppel.ai/api/v1/interactions" \
    -H "Authorization: Bearer dpl_live_YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.getdoppel.ai/api/v1/interactions', {
    headers: {
      'Authorization': 'Bearer dpl_live_YOUR_API_KEY'
    }
  });
  const data = await response.json();
  ```

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

  response = requests.get(
      'https://api.getdoppel.ai/api/v1/interactions',
      headers={'Authorization': 'Bearer dpl_live_YOUR_API_KEY'}
  )
  data = response.json()
  ```
</CodeGroup>

### Response Example

```json theme={null}
{
  "success": true,
  "data": {
    "interactions": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "channel": "voice",
        "type": "INBOUND",
        "direction": "inbound",
        "phone_number": "+34612345678",
        "clinic_id": "clinic-uuid-here",
        "started_at": "2024-01-15T10:30:00.000Z",
        "ended_at": "2024-01-15T10:35:00.000Z",
        "duration_seconds": 300,
        "outcome": "APPOINTMENT_BOOKED",
        "summary": "Patient called to schedule a general checkup appointment...",
        "recording_url": "https://storage.example.com/recordings/abc123.mp3"
      },
      {
        "id": "660f9511-f30c-52e5-b827-557766551111",
        "channel": "whatsapp",
        "type": "APPOINTMENT_REMINDER",
        "direction": "outbound",
        "phone_number": "+34698765432",
        "clinic_id": "clinic-uuid-here",
        "started_at": "2024-01-15T09:00:00.000Z",
        "ended_at": "2024-01-15T09:05:00.000Z",
        "outcome": "APPOINTMENT_BOOKED",
        "transcript": [
          {
            "role": "assistant",
            "content": "Hi! This is a reminder for your appointment tomorrow at 10:00 AM."
          },
          {
            "role": "user",
            "content": "Thanks! I'll be there."
          }
        ],
        "summary": "Appointment reminder sent and confirmed by patient."
      }
    ]
  },
  "meta": {
    "page": 1,
    "limit": 25,
    "total": 150,
    "total_pages": 6,
    "has_more": true
  },
  "request_id": "req_abc123xyz",
  "timestamp": "2024-01-15T10:30:00.000Z"
}
```

## Error Responses

### Invalid Parameters

```json theme={null}
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid query parameters",
    "details": {
      "channel": "Must be 'voice' or 'whatsapp'"
    }
  },
  "request_id": "req_abc123xyz",
  "timestamp": "2024-01-15T10:30:00.000Z"
}
```

## See Also

<Card title="Filtering Interactions" icon="filter" href="/api-reference/interactions/filtering">
  Learn how to use advanced filtering to get exactly the data you need.
</Card>
