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

# Authentication

> Authenticate API requests with your partner API key

All requests to the Aniva Partner API must include your partner API key in the `x-api-key` request header.

```
x-api-key: your-api-key-here
```

<Note>Contact Aniva to obtain your API key. Keys are issued per partner account.</Note>

## Sending authenticated requests

Include the `x-api-key` header in every request you make to the API.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://anivahealth.com/api/v1/locations \
    -H "x-api-key: YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://anivahealth.com/api/v1/locations', {
    headers: {
      'x-api-key': 'YOUR_API_KEY',
    },
  });

  const data = await response.json();
  ```
</CodeGroup>

## Error responses

If your API key is missing or invalid, the API responds with `403 Forbidden`.

```json theme={null}
{
  "error": "Forbidden"
}
```

If you receive this error, verify that:

1. Your request includes the `x-api-key` header.
2. The API key value is correct and has not been rotated.

<Warning>
  Never expose your API key in client-side code or public repositories. Treat it like a password.
</Warning>

Contact Aniva to rotate a compromised key or to request changes to your API key permissions.
