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

# Authentication

> Authenticate and access Permutive APIs

Permutive uses **API keys** for authentication. These keys take the form of version 4 UUIDs, which are to be included in the `X-API-Key` header of requests.

```curl theme={"dark"}
curl https://api.permutive.app/... \
  -H 'X-API-Key: f9975143-2d88-46dc-9247-1fb6c790e1cc' \
  ...
```

Alternatively, customers can provide their API key as a query parameter on the `k` parameter:

```curl theme={"dark"}
curl https://api.permutive.app/...?k=f9975143-2d88-46dc-9247-1fb6c790e1cc \
  ...
```

## Key types

There are two types of API key: **public** and **private**.

| Key type | Description                                                                                                                                                     |
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Public   | Used when you cannot guarantee the key won't be seen by others. These are typically used on your sites & apps.                                                  |
| Private  | Used when you can guarantee the key won't be seen by others. These are typically used for making changes to your Permutive account, e.g. creating a new cohort. |

## Creating an API key

You can manage your API keys in the [Settings › Keys](https://dash.permutive.com/settings/keys) section of the [Permutive Dashboard](https://dash.permutive.com).

To create a new API key, follow these steps:

1. Navigate to the [Keys](https://dash.permutive.com/settings/keys) section of your Permutive [organization settings](https://dash.permutive.com/settings).
2. Click on the *Add Key* button.
3. Choose between a public and private key, and provide a name for your key.
4. Once you click *Add Key*, the key you have created will be listed in the Keys section.
