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

# API Overview

> Authentication, error handling, and common patterns

# API Overview

## Authentication

The Lighthouse API uses Bearer token authentication via Supabase Auth. Include your token in every request:

```bash theme={null}
curl -H "Authorization: Bearer <token>" \
  https://api.lighthousefh.com/v1/cases
```

## Response Format

All successful responses are wrapped in an `ApiResponse` envelope:

```json theme={null}
{
  "status": "success",
  "data": { ... },
  "message": null,
  "timestamp": "2024-01-15T10:30:00Z",
  "request_id": null
}
```

## Error Format

Errors return an `ApiError` object:

```json theme={null}
{
  "status": "error",
  "error": "Not Found",
  "message": "The requested resource was not found",
  "status_code": 404,
  "timestamp": "2024-01-15T10:30:00Z",
  "request_id": null
}
```

## Common Status Codes

| Code | Meaning                                     |
| ---- | ------------------------------------------- |
| 200  | Success                                     |
| 201  | Created                                     |
| 204  | No Content (successful delete)              |
| 400  | Bad Request (validation error)              |
| 401  | Unauthorized (missing or invalid token)     |
| 403  | Forbidden (insufficient permissions)        |
| 404  | Not Found                                   |
| 409  | Conflict (resource already being processed) |
| 500  | Internal Server Error                       |

## Rate Limiting

There are currently no rate limits enforced. This may change in future versions.
