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

# Quickstart

> Get started with the Doppel API in 5 minutes

# Quickstart

This guide will help you make your first API request in just a few minutes.

## Step 1: Get your API key

Contact your Doppel account manager to receive your API key. The key will look like:

```
dpl_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

<Warning>
  Keep your API key secure. Never expose it in client-side code or public repositories.
</Warning>

## Step 2: Make your first request

Let's start by listing your clinics. Replace `YOUR_API_KEY` with your actual key:

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

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

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

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

## Step 3: Explore interactions

Now let's fetch your recent interactions:

<CodeGroup>
  ```bash cURL theme={null}
  curl -H "Authorization: Bearer YOUR_API_KEY" \
    "https://api.getdoppel.ai/api/v1/interactions?limit=10"
  ```

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

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

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

## Step 4: Get metrics

Retrieve aggregated metrics for a date range:

<CodeGroup>
  ```bash cURL theme={null}
  curl -H "Authorization: Bearer YOUR_API_KEY" \
    "https://api.getdoppel.ai/api/v1/metrics/summary?date_from=2024-01-01&date_to=2024-12-31"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.getdoppel.ai/api/v1/metrics/summary?date_from=2024-01-01&date_to=2024-12-31',
    {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
      }
    }
  );
  const data = await response.json();
  console.log(data);
  ```

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

  response = requests.get(
      'https://api.getdoppel.ai/api/v1/metrics/summary',
      params={
          'date_from': '2024-01-01',
          'date_to': '2024-12-31'
      },
      headers={'Authorization': 'Bearer YOUR_API_KEY'}
  )
  data = response.json()
  print(data)
  ```
</CodeGroup>

## Step 5: Get your bookings

Retrieve all appointment-related interactions (booked, modified, cancelled):

<CodeGroup>
  ```bash cURL theme={null}
  curl -H "Authorization: Bearer YOUR_API_KEY" \
    "https://api.getdoppel.ai/api/v1/interactions?outcome=APPOINTMENT_BOOKED,APPOINTMENT_MODIFIED,APPOINTMENT_CANCELLED"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.getdoppel.ai/api/v1/interactions?outcome=APPOINTMENT_BOOKED,APPOINTMENT_MODIFIED,APPOINTMENT_CANCELLED',
    {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
      }
    }
  );
  const data = await response.json();
  console.log(`Found ${data.data.interactions.length} bookings`);
  ```

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

  response = requests.get(
      'https://api.getdoppel.ai/api/v1/interactions',
      params={'outcome': 'APPOINTMENT_BOOKED,APPOINTMENT_MODIFIED,APPOINTMENT_CANCELLED'},
      headers={'Authorization': 'Bearer YOUR_API_KEY'}
  )
  data = response.json()
  print(f"Found {len(data['data']['interactions'])} bookings")
  ```
</CodeGroup>

<Info>
  You can filter by multiple outcomes using comma-separated values. See [Filtering Interactions](/api-reference/interactions/filtering) for more options.
</Info>

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication/api-keys">
    Learn more about API key authentication and scopes.
  </Card>

  <Card title="Rate Limits" icon="gauge" href="/authentication/rate-limits">
    Understand rate limiting and how to handle it.
  </Card>

  <Card title="Filtering Interactions" icon="filter" href="/api-reference/interactions/filtering">
    Master the powerful filtering options for interactions.
  </Card>

  <Card title="API Reference" icon="book" href="/api-reference/overview">
    Explore all available endpoints.
  </Card>
</CardGroup>
