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

# Quickstart

> Make your first API call in under 5 minutes

# Quickstart

Get up and running with the Nevatal API in three steps.

## Prerequisites

* A Nevatal account with an active clinic
* An API key ([create one here](/authentication))

## Step 1: Verify your connection

Test that your API key works by hitting the health endpoint:

```bash theme={null}
curl -X GET https://api.nevatal.com/health
```

Expected response:

```json theme={null}
{
  "status": "ok"
}
```

## Step 2: List your patients

Fetch the first page of patients in your clinic:

```bash theme={null}
curl -X GET https://api.nevatal.com/api/v1/patients \
  -H "Authorization: Bearer nvtl_your_api_key" \
  -H "Content-Type: application/json"
```

Response:

```json theme={null}
{
  "data": [
    {
      "id": "pat_abc123",
      "firstName": "María",
      "lastName": "García",
      "email": "maria@example.com",
      "phone": "+573001234567",
      "documentType": "CC",
      "documentNumber": "1234567890",
      "createdAt": "2025-03-15T10:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 142
  }
}
```

## Step 3: Create an appointment

Book an appointment for a patient:

```bash theme={null}
curl -X POST https://api.nevatal.com/api/v1/appointments \
  -H "Authorization: Bearer nvtl_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "patientId": "pat_abc123",
    "doctorId": "usr_doctor456",
    "locationId": "loc_main",
    "procedureId": "proc_general_consult",
    "startTime": "2025-04-01T09:00:00-05:00",
    "endTime": "2025-04-01T09:30:00-05:00",
    "notes": "Initial consultation"
  }'
```

Response:

```json theme={null}
{
  "id": "apt_xyz789",
  "status": "confirmed",
  "patient": {
    "id": "pat_abc123",
    "firstName": "María",
    "lastName": "García"
  },
  "startTime": "2025-04-01T09:00:00-05:00",
  "endTime": "2025-04-01T09:30:00-05:00"
}
```

## What's next?

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/api-reference/overview">
    Explore all available endpoints.
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/guides/error-handling">
    Learn how to handle API errors gracefully.
  </Card>
</CardGroup>
