<!-- https://help.fansmetric.com/public-api/how-to-create-and-manage-api-keys -->
# How to Create and Manage API Keys

Section: Public API. Updated 2026-08-26. Page: https://help.fansmetric.com/public-api/how-to-create-and-manage-api-keys

API keys are how external services and integrations authenticate with the FansMetric Public API. Each key can be assigned roles that control exactly what it's allowed to do.

### Before You Begin

> [!NOTE]
> **Permission required:** You must be an **organization admin** to create, edit, or revoke API keys.

### Accessing API Keys

Go to **Public API** in the left navigation menu (under the **Organization** group) and click **API Keys**. The header shows how many keys you have, for example ***3 of 10 active*** — each organization can have up to **10 active keys** at a time.

### Creating an API Key

1. Click ***"Create API Key"***
2. Enter a **Key Name** (for example, `Production`, `Staging`, or `Analytics Bot`). The name is permanent and can't be changed later.
3. Under **Roles**, select one or more roles to control what the key can access
4. Click ***"Create Key"***

> [!NOTE]
> **Important:** Your new key is shown **only once**, right after creation, in a green banner that reads *"Copy your new API key now. It won't be shown again."* Click ***"Copy"*** and store it somewhere secure. If you lose it, you'll need to revoke the key and create a new one.

> [!NOTE]
> **Tip:** If you've reached the 10-key limit, the ***"Create API Key"*** button is disabled. Revoke an existing key to free up a slot.

### Managing API Keys

The API Keys page has two tabs:

- **Active** - Keys that are currently working
- **Inactive** - Keys that have been revoked or have expired

![](https://help.fansmetric.com/images/public-api/how-to-create-and-manage-api-keys/1.jpg)

Each key in the list shows:

- **Name** - With a green dot for active keys and a gray dot for inactive ones
- **Prefix** - The first characters of the key (the full key is never shown again after creation)
- **Roles** - The roles assigned to the key. A key with no role shows a ***No role*** tag.
- **Created** - When the key was created
- **Last Used** - When the key last made a request (shows a dash if never used)

### **Editing a Key's Roles**

Click ***"Edit roles"*** next to an active key, adjust the selected roles, and click ***"Save"***. This changes what the key is allowed to do without having to recreate it.

**Revoking a Key**

Click ***"Revoke"*** next to an active key, then confirm by clicking ***"Revoke Key"***.

> [!NOTE]
> **Warning:** Revoking a key immediately disables it. Any service using that key will lose access, and this cannot be undone. The key then moves to the **Inactive** tab.

**Unrevoking a Key**

On the **Inactive** tab, a revoked key that hasn't expired shows an ***"Unrevoke"*** button. Click it to re-activate the key. Expired keys cannot be unrevoked.

### Things to Keep in Mind

- Your API key is shown **only once**. Copy and store it securely right after creating it.
- Each organization can have up to **10 active keys** at a time.
- Revoking a key is **immediate and permanent**. Any integration using it will stop working.
- Assign roles carefully so each key only has the access it needs.

### API Reference

Building an integration on top of the Public API? The docs cover endpoint references, request examples, and a live request playground:

- [Introduction](https://api-docs.fansmetric.com/introduction) — What the Public API can do and how to get started
- [Authentication](https://api-docs.fansmetric.com/auth) — How to authenticate your requests
- [API Keys](https://api-docs.fansmetric.com/auth/api-keys) — Passing your API key in requests

### Related Articles

- [How to Manage Roles & Permissions](https://help.fansmetric.com/public-api/how-to-manage-roles-permissions)
- [How to Use the Public API Dashboard](https://help.fansmetric.com/public-api/how-to-use-the-public-api-dashboard)
