> ## Documentation index
> Fetch the complete documentation index at: https://docs.prescientai.com/llms.txt
> Use this file to discover all available pages before exploring further. Add `.md` to any page URL to get that page as Markdown.

# Create and revoke an API key

> Steps for an Admin to make an API key with an optional end date and channel scope, copy the key the one time it shows, and stop a key.

An API key authenticates requests to the Prescient GraphQL API. You create and revoke keys on the **API keys** tab of the **Settings** page. Only an Admin sees this tab. For the API itself, see [API overview](https://docs.prescientai.com/api).

The capture shows the **API keys** tab before a key is created.

![The API keys tab with the message No API keys yet and the Create API key button.](https://docs.prescientai.com/_astro/api-keys-empty.BweBbx0w_ZGmDpy.webp)

## How do you create an API key?

The capture shows the **Create API key** dialog.

![The Create API key dialog with the fields Name and Expires at and a list of channels for the scope.](https://docs.prescientai.com/_astro/create-api-key-dialog.Ck58JnX9_ZdHE1V.webp)

1. Select the gear icon in the top bar, then select **API keys**.

2. Select **Create API key**.

3. Type a **Name** that tells you what the key is for.

4. Optional: set a date in **Expires at**. If you leave the field empty, the key never expires.

5. Optional: select channels in **Channel scope**. If you select no channel, the key has access to each channel.

6. Select **Create key**.

   The **Copy your API key now** dialog opens with the full key.

7. Copy the key and store it in a safe place.

   If the browser refuses the copy, the product tells you to select the key and copy it by hand.

8. Select **I've saved it**.

> **Caution:** The product shows the full key one time only. After you close the dialog, you cannot get the key again. If you lose the key, revoke it and create a new one.

The new key appears in the table. The **Key** column shows only the first 8 characters.

## How do you revoke an API key?

1. Find the key in the table and select **Revoke**.

2. Read the confirmation, then select **Revoke key**.

The product shows **API key revoked.** The key stops working immediately, and each integration that uses the key loses access. You cannot undo a revoke.

## How do you know if a key is in use?

Read the **Last used** column. The column shows the time since the last request with the key, or **Never**.

The **Expires** column shows the end date of a key, **Never**, or the **Expired** badge.
