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

# Quickstart

> Create a free API key and make your first authenticated call to the Scheduling API.

Every request needs a free API key, sent as a Bearer token. Requests without a valid key
return `401`; requests with one return `200`. This guide covers getting a key and making
your first call to `GET /v1/scheduling/slots`.

## 1. Create an organization and key

<Steps>
  <Step title="Sign in to the dashboard">
    Go to [platform.haau3.com](https://platform.haau3.com) and sign in. The platform is
    organization-based, so you'll create or join an organization. Your keys belong to it.
  </Step>

  <Step title="Create a free API key">
    Open **API Keys** and create a key. It looks like `haau3_sk_…` and is shown only once,
    so copy it somewhere safe.
  </Step>
</Steps>

## 2. Make your first call

Pass the key as a Bearer token. A request without a valid key returns `401`:

<CodeGroup>
  ```bash Without a key → 401 theme={null}
  curl -i https://api.haau3.com/v1/scheduling/slots
  ```

  ```json Response theme={null}
  HTTP/1.1 401 Unauthorized
  {
    "error": "API key required",
    "message": "Create a free key in the dashboard. See https://platform.haau3.com/docs"
  }
  ```
</CodeGroup>

Add your key and the same request returns `200` with matching slots:

<CodeGroup>
  ```bash With a key → 200 theme={null}
  curl -s https://api.haau3.com/v1/scheduling/slots \
    -H "Authorization: Bearer haau3_sk_your_key_here"
  ```

  ```json Response theme={null}
  {
    "slots": [
      {
        "id": "example-slot-1",
        "publisher": "example-clinics",
        "scheduleId": "example-schedule-1",
        "status": "free",
        "start": "2026-07-01T15:00:00-04:00",
        "end": "2026-07-01T15:30:00-04:00",
        "serviceTypeText": "Annual physical",
        "acceptingPatients": "newpt",
        "isVirtual": false,
        "location": {
          "name": "Example Clinic",
          "city": "Boston",
          "state": "MA"
        }
      }
    ],
    "total": 1
  }
  ```
</CodeGroup>

<Note>
  `total` is the full pre-pagination count. Page through results with `limit` (1–100,
  default 25) and `offset`.
</Note>

## 3. Filter the results

The endpoint supports query filters. For example, to get only virtual slots in
Massachusetts:

```bash theme={null}
curl -s "https://api.haau3.com/v1/scheduling/slots?state=MA&isVirtual=true&limit=10" \
  -H "Authorization: Bearer haau3_sk_your_key_here"
```

To discover the valid `serviceTypeCode` values, call
`GET /v1/scheduling/service-types` — it returns the distinct service types seen across
served slots, each with a count.

To find slots accepting new patients, add `acceptingPatients=newpt` (HL7 accepting-patients
codes: `newpt` / `existptonly` / `existptfam`). The filter is lenient — a slot that
does not declare an acceptance code still matches:

```bash theme={null}
curl -s "https://api.haau3.com/v1/scheduling/slots?acceptingPatients=newpt&limit=10" \
  -H "Authorization: Bearer haau3_sk_your_key_here"
```

See the [API Reference](/api-reference) for every parameter, and
[Authentication](/authentication) for more on keys.
