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

# API keys

> Create, list, and revoke BotGauge project API keys. Keys work with the SDK, the CLI, and the API, reach one project only, and are shown once.

API keys are for the BotGauge CLI and API, including sending traces from the SDK. Each key belongs to one project and can only reach that project. You can use a key as soon as it exists. See [Get your API key](https://www.botgauge.com/docs/tracing/api-key.md) for how to set it in your app.

Only a workspace **Admin** can see, create, or revoke API keys. Org owners and admins have the same access in workspaces they belong to.

![The Project API keys table with name, last four characters, created, and last used](https://mintcdn.com/botguage/CvMAYy1jOk7D5CuB/images/platform/project-api-keys.jpg?fit=max\&auto=format\&n=CvMAYy1jOk7D5CuB\&q=85\&s=5b9ffff8bdc53afccdfabaa24f5e4036)

Project, API keys.

## Create a key

**1. Open the project**

Switch to the project that should receive the traces.

**2. Go to API keys**

Open **Settings, Project, API keys** and choose **Create key**.

**3. Name the key**

Use a name that says what the key is for, such as `CI - GitHub Actions` or `Script - Priya`. A good name makes it easier to know what breaks if you revoke it.

**4. Copy the key**

The dialog shows the full key once, with a **Copy** button. It starts with `bg_`. You can't view it again.

![The Create API key dialog asking for a key name](https://mintcdn.com/botguage/CvMAYy1jOk7D5CuB/images/platform/create-api-key.jpg?fit=max\&auto=format\&n=CvMAYy1jOk7D5CuB\&q=85\&s=132ac4b85fdb1f7c5df2b770e530a5ee)

Name the key after what will use it.

![The Copy your new key dialog showing the key once with a Copy button](https://mintcdn.com/botguage/CvMAYy1jOk7D5CuB/images/platform/copy-new-api-key.jpg?fit=max\&auto=format\&n=CvMAYy1jOk7D5CuB\&q=85\&s=160d167d44afdef7f00dd97799c8d063)

The full key is shown once. The value in this image is masked.

The console notes that you can use a key with the BotGauge CLI (`botgauge login`) or the API, and that a new key is shown once, when you create it.

> [!WARNING]
>
> Treat a key like a password. Store it in a secrets manager or CI secret, never in source control. If a key is exposed, revoke it and create a new one.

## What the table shows

The API keys table lists each key's name, a masked key showing its prefix and last four characters (for example `bg_...W35g`), when it was created, and when it was last used. A key that has never been used shows no last-used time.

## Revoke a key

Choose **Revoke** on a key and confirm. The key stops working immediately and can't be turned back on. To replace a key, create a new one first, update your deployments, confirm traces still arrive, and then revoke the old key.

## One key per consumer

Create a separate key for each pipeline, service, or person. When a key leaks or someone leaves, you can revoke exactly one key without touching the rest, and the last-used time tells you which keys are still active.

Generate a project API keyGo to [BotGauge](https://cloud.botgauge.com) to create a key and start sending traces.

[Create an API key →](https://cloud.botgauge.com)


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