# Create and Manage API Keys

An API key authenticates requests to Redbelt as a particular identity. Use it for
server-side integrations and automation.

## Before you start

Select the correct organization. You need organization API access to see the
Developer page, and permission to edit admin settings to create or revoke a key.
Creation and revocation can require a recent sign-in.

## Create a key

1. Open **Settings → Developer**.
2. Under **API keys**, click **Create key**.
3. Under **Owned By**, choose the identity:
   * **Service account:** adds a bot user to your organization.
   * **You:** makes requests as your user. Removing you from the organization
     disables this key.
4. Enter a recognizable **Name**, such as **Reporting integration**.
5. For a service account, choose whether to enable
   **Auto share resources with creator**. This shares newly created resources
   with you for supported resource types; existing private resources still need
   their own permissions. This setting does not transfer ownership of API threads
   or let you read a service user's thread in the browser.
6. Click **Create secret key**.
7. In **Save your key**, use **Copy** and store the secret before clicking **Done**.

![Current Create API Key form, showing ownership, name, and resource sharing options.](/screenshots/current/create-api-key.jpg)

The full secret is shown once. The key list shows identifiers and dates so you
can recognize keys later; it does not let you recover the original secret.

## Store and use the secret

Keep the key in a secret manager or a protected environment variable. Send it
in the HTTP **Authorization** header as **Bearer YOUR_API_KEY**.
Do not place it in a URL, public frontend code, a screenshot, or a committed file.

For an example request, follow the [API quickstart](/quickstart/).

## Revoke a key

1. Return to **Settings → Developer → API keys**.
2. Find the key by its name and dates.
3. Click **Revoke** and complete the confirmation.

Requests using that key will no longer authenticate. Update any integrations
that depend on it. Revoking a key does not delete files or threads it previously
created.

## Troubleshooting

If **Create key** or **Revoke** is unavailable, ask an organization administrator
to check your permissions. If the dialog offers **Sign in again**, reauthenticate
and retry the operation. If you lost the secret, create a replacement and revoke
the key you can no longer use.
