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

# Organization API Keys

> Create organization API keys for the Admin API and Metrics API that outlive the person who created them

# Organization API keys

In Liberator **2.7** and later, Super Admins create API keys that belong to the organization. A key keeps working when the person who created it changes roles or leaves. Each create, use, and revoke is audited.

> [!NOTE]
>
> Organization API keys are not the personal API keys that client libraries use to query datasets. A personal key follows that user's entitlements. An organization key calls the Admin API or the Metrics API, and only within the scopes you select.

## What a key can call

| Scope | Use it for |
| - | - |
| **Admin** | Scripts that create users, assign entitlements, or perform other Admin API tasks |
| **Metrics** | Grafana or another Prometheus client reading the same data as [System Monitoring](https://knowledge.cloudquant.com/system-monitoring/overview.md) |

Select only the scopes that tool needs. A metrics dashboard does not need the Admin API.

## Create a key

**1. Open API Keys**

Sign in as a Super Admin. Open **Settings** (the gear), then **API Keys**.

**2. Create**

Name the key after the tool that will use it, such as `grafana-prod` or `user-provisioning`. Select **Admin**, **Metrics**, or both.

**3. Copy the secret**

Liberator shows the secret once. Copy it into your secrets manager before you close the dialog. Liberator stores only a hash. A lost secret cannot be displayed again.

Send the secret as a bearer token:

```
Authorization: Bearer <secret>
```

> [!WARNING]
>
> Treat the secret like a password. Do not commit it to source control or paste it into a ticket. If it leaks, revoke it and create a new key.

## Keys created before 2.7

Bearer tokens created before this release do not keep working. That includes Metrics API tokens issued from **System Monitoring → Grafana Integration**. Create a new organization key, update the tool, then revoke the old token.

See the [Grafana](https://knowledge.cloudquant.com/integrations/grafana.md) guide for the metrics endpoint and datasource settings.

## Revoke or replace a key

1. Create a new key for the same tool.
2. Update the tool to send the new secret.
3. Confirm the tool succeeds.
4. Revoke the old key on **API Keys**.

Revocation takes effect on the next request. You do not need to restart Liberator.

## Related

> [card] [Grafana](https://knowledge.cloudquant.com/integrations/grafana.md)
>
> Point Grafana at the Metrics API with an organization key

> [card] [Security and access](https://knowledge.cloudquant.com/security-and-access.md)
>
> Personal API keys, user sign-in, and dataset entitlements

> [card] [Managing users](https://knowledge.cloudquant.com/administration/managing-users-and-entitlements.md)
>
> The same user and entitlement actions you can automate with an Admin key

> [card] [What's new in 2.7](https://knowledge.cloudquant.com/whats-new/liberator-2.7.md)
>
> Liberator 2.7 release notes


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