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

# Authentication

Learn how to authenticate your requests to the Enzo API

## Overview

The Enzo platform uses Bearer token authentication for all API requests. You'll need to include your API token in the `Authorization` header of each request.

## Obtaining an API Token

1. Log into the [Enzo Dashboard](https://app.enzo.health)
2. Navigate to Settings → Developer
3. Create a new API key or copy an existing one

**Important**: Keep your API tokens secure and never share them publicly. Rotate them regularly and immediately if they're ever compromised.

## Making Authenticated Requests

### HTTP Header Format

Include your API token in the Authorization header:

```bash theme={null}
Authorization: Bearer <API_TOKEN>
```

### Example Requests

#### Using Node.js (fetch)

```typescript theme={null}
const makeAuthenticatedRequest = async () => {
  const response = await fetch("https://app.enzo.health/api/v1/workflow_runs", {
    method: "POST",
    headers: {
      Authorization: "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json",
    },
  });

  return response.json();
};
```

#### Using cURL

```bash theme={null}
curl -X POST https://app.enzo.health/api/v1/workflow_runs \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
```

## Error Handling

If authentication fails, you'll receive a `401 Unauthorized` response. Common causes include:

* Missing the Authorization header
* Invalid token format
* Expired or revoked token
* Insufficient permissions for the requested resource
