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

# Authentication for Peec API

All requests to the **Peec AI Customer API** must be authenticated with a valid API key. API keys can be scoped at either the **company** or **project** level, depending on your use case. Create your API key [here](https://app.peec.ai/api-keys).

***

## Passing API Keys

You can authenticate by providing your API key in one of two ways:

### 1. HTTP Header

```bash theme={null}
curl -X GET "https://api.peec.ai/customer/v1/prompts" \
  -H "x-api-key: YOUR_API_KEY"
```

### 2. Query Parameter (deprecated)

> [!WARNING]
>
> The `api_key` query parameter is deprecated and stops working on November 23, 2026. From that date, requests that include it return `400`. Send your key in the `X-API-Key` header instead.

```bash theme={null}
curl -X GET "https://api.peec.ai/customer/v1/prompts?api_key=YOUR_API_KEY"
```

## API key scopes

API key scopes determine the level of access granted to the API. Choosing the appropriate scope helps ensure that your integrations have only the permissions they need.

* **Company-scoped keys**: Provide access across all projects within your organization. Use when building integrations that span multiple projects.
* **Project-scoped keys:** Limited to a single project. Use when you need to isolate access for specific applications, environments, or teams.

## Best practices

* Keep your API keys secret and never expose them in client-side code.
* Rotate keys regularly.
* Use project-scoped keys where possible to limit risk.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.