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

# Authentication

> How to authenticate with the Valpas API using your API key

The Valpas API uses API key authentication. Include your API key in every request using the `x-api-key` header.

## Using your API key

Pass your key as an HTTP header named `x-api-key`:

```bash theme={null}
curl https://connect.valpashotels.com/hotels \
  -H "x-api-key: YOUR_API_KEY"
```

<Warning>
  Never expose your API key in client-side code or public repositories. Use environment variables to store secrets.
</Warning>

## How to get an API key

Email [team@valpas.io](mailto:team@valpas.io) to request an API key. You will receive your key by email.

## 401 Unauthorized

If your request is missing an API key or the key is invalid, the API returns HTTP 401:

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

To resolve a 401:

* Verify your API key is included in the `x-api-key` header (not a query parameter or body)
* Check that the key has not been revoked
* Confirm you are sending the request to `https://connect.valpashotels.com` (not a staging URL)
