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

# Manage API Keys

> Manage API Keys for Programmatic Connections

## Using API Keys

The HTTP API and Python client use API keys for authentication in the following ways:

| Option | How To Use API Key |
| - | - |
| [HTTP API](https://docs.agents.kolena.com/api-reference/quickstart.md) | Set API Key as Authorization bearer token in requests |
| [Python client](https://docs.agents.kolena.com/python-client/quickstart.md) | Set API Key to `KOLENA_API_KEY` environment variable |

## Personal API Keys

Open your user profile at the bottom of the sidebar, click "Profile Settings", then switch to the "API Keys" tab.

![](https://mintcdn.com/kolena/FLD95qvpEoPCpQEJ/assets/profile-settings.webp?fit=max\&auto=format\&n=FLD95qvpEoPCpQEJ\&q=85\&s=f029806f8d3e31a5165196054013caff)

From here you can create new Keys and revoke existing ones.
All personal API Keys have the same roles and permissions as your user.

![](https://mintcdn.com/kolena/FLD95qvpEoPCpQEJ/assets/api-keys.webp?fit=max\&auto=format\&n=FLD95qvpEoPCpQEJ\&q=85\&s=14680ed8795496249c39a50c6567c864)

## Service Users and API Keys

> [!NOTE]
>
> This is available on the Enterprise Plan. [Contact Kolena](mailto:support@kolena.com) if you’re not on an Enterprise plan but would like to try this feature.

Service users can be created with API Keys associated to them.
This allows you to create Keys that are not tied to a specific user's membership in your Organization or their roles and permissions.

Organization `admin`s can create service users and API Keys from the "API Keys" tab on [your Organization page](https://agents.kolena.com/organization?tab=api-keys).

![](https://mintcdn.com/kolena/IrRohy5pNNz6yw6t/assets/service-user.png?fit=max\&auto=format\&n=IrRohy5pNNz6yw6t\&q=85\&s=6748f309ef1508d3e332a90c94084ca6)

Creating an API Key from this modal will also create a service user.
This service user has a default Organization role which you can manage, and can be [given permissions on individual agents](https://docs.agents.kolena.com/fine-grained-access-control.md) like any other Organization user.

## Managing API Keys Across Your Organization

Organization `admin`s can manage and revoke API keys for their team members and service users through the "API Keys" tab on [your Organization page](https://agents.kolena.com/organization?tab=api-keys).
The "Last Used" column shows when each key last authenticated a request, so you can find and revoke unused keys.

## Programmatic API Key Management

Users can programmatically manage their API keys for automated rotation and monitoring workflows.

See the [API reference](https://docs.agents.kolena.com/api-reference/create-api-key.md) or the [Python client guide](https://docs.agents.kolena.com/python-client/quickstart.md#manage-api-keys)

### API Key Expiration

> [!NOTE]
>
> This is available on the Enterprise Plan. [Contact Kolena](mailto:support@kolena.com) if you’re not on an Enterprise plan but would like to try this feature.

Organization administrators can configure organization-wide API key expiration policies from the "Data & Security" tab on [your Organization page](https://agents.kolena.com/organization?tab=data-and-security):

* **Organization-level policies**: Admins can require all keys to have an expiration date and set maximum allowed expiration periods for compliance
* **Individual key expirations**: When creating new API keys, users can set expiration dates that don't exceed organization policies
* **Expiration notifications**: Configure email alerts to be sent a specified number of days before key expiration to both administrators and the key owner

![](https://mintcdn.com/kolena/IrRohy5pNNz6yw6t/assets/api-key-policy.png?fit=max\&auto=format\&n=IrRohy5pNNz6yw6t\&q=85\&s=14afcf88e970c63043f89c8b79e64f8c)


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