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

# Introduction

> Get started with the Solum Health API

## Base URL

All API requests should be made to:

```
https://api.getsolum.com
```

## Authentication

The Solum Health API supports two authentication methods:

### API Key

Use an API key in the `X-API-Key` header.

```bash theme={null}
curl https://api.getsolum.com/v1/patients \
  -H "X-API-Key: YOUR_API_KEY"
```

API keys are scoped to a single company. You can create and manage API keys from the [Solum dashboard](https://app.getsolum.com/settings/api-keys).

## Multi-Tenancy

All data is scoped to a company. Your authentication credentials determine which company's data you can access. Every request is automatically filtered to your company's resources.

## Error Responses

The API returns errors in a consistent format:

```json theme={null}
{
  "detail": {
    "type": "validation_error",
    "code": "invalid_field",
    "message": "A human-readable description of what went wrong",
    "param": "field_name"
  }
}
```

### Common HTTP Status Codes

| Status | Description                                              |
| ------ | -------------------------------------------------------- |
| `200`  | Success                                                  |
| `201`  | Resource created                                         |
| `400`  | Bad request (invalid parameters)                         |
| `401`  | Unauthorized (missing or invalid credentials)            |
| `403`  | Forbidden (insufficient permissions)                     |
| `404`  | Resource not found                                       |
| `409`  | Conflict (e.g., version mismatch for optimistic locking) |
| `422`  | Validation error                                         |
| `500`  | Internal server error                                    |

## Soft Deletes

Most resources use soft deletes. When you call `DELETE` on a resource, it is marked as inactive rather than permanently removed. List endpoints return only active resources by default.

## Optimistic Locking

Versioned resources such as Patients and Payors include a `version` field. When
updating one of these resources, include its current `version` in the request
body. If it no longer matches because another update occurred, the API returns
a `409 Conflict`. Referral request and response schemas are not versioned.

## Pagination

List endpoints support pagination with `page` and `limit` query parameters:

```bash theme={null}
curl "https://api.getsolum.com/v1/patients?page=1&limit=20" \
  -H "X-API-Key: YOUR_API_KEY"
```
