---
title: "Manage API keys using the app"
slug: "manage-api-keys-using-the-app"
abstract: "How to use the Content Hub ONE app to create, edit, and delete the API keys used with the Preview and Delivery APIs."
---
# Manage API keys using the app

To use the [Preview or Delivery API](https://doc.sitecore.com/ch-one/en/developers/content-hub-one/settings/preview-and-delivery-apis.md "Preview and Delivery APIs"), you require a valid API key. You can create, rename, or delete API keys using the Content Hub ONE app if you have the necessary permissions, or you can use the API.

> [!note]
> The **Settings** menu is only visible if you have an *Admin* role.

## Create an API key

Be sure to copy the generated API key because you cannot view it after you close the **Create API key** dialog.

> [!note]
> Each API key is valid for a specific tenant (app) within an organization.

To create an API key:

1. On the menu bar, click **Settings** and, in the **INTEGRATION** section of the left pane, click **API keys**.
2. On the **API keys** page, click ![plus-chone.png](https://doc.sitecore.com/api/markdown-image/ch-one/en/developers/content-hub-one/images/plus-chone.png) **Create API key**.
3. In the **Create API key** dialog, in the **Name** field, enter a name for the key.
4. Select one of the following options:
    - **Delivery** - to use the Delivery API. This is for a production environment and exposes all published content.
    - **Preview** - to use the Preview API. This is for a staging or testing environment and exposes a preview of all content (including drafts).
5. Click **Save**. This generates an API key that you can use with GraphQL.
6. In the **API key created** dialog, click **Copy** ![copy icon](https://doc.sitecore.com/api/markdown-image/ch-one/en/developers/content-hub-one/images/content-copy-chone.png) to copy the key to the clipboard.
7. Click **Open GraphQL IDE** to open the [integrated development environment (IDE)](https://doc.sitecore.com/ch-one/en/developers/content-hub-one/settings/graphql-ide.md "GraphQL IDE") on a new tab.
8. In the IDE, on the **HTTP HEADERS** tab, add the API key you just copied using the following format:

    ```json
    {
    "X-GQL-Token":"<API_KEY>"
    }
    ```

## Rename an API key

You can only edit the name of the API key.

To rename an API key:

1. On the menu bar, click **Settings** and, in the **INTEGRATION** section of the left pane, click **API keys**.
2. On the **API keys** page, next to the API key you want to edit, click **More actions** ![More actions icon](https://doc.sitecore.com/api/markdown-image/ch-one/en/developers/content-hub-one/images/more-actions-chone.png) > **Edit**.
3. Change the name of the API key as required and click **Save**.

## Delete an API key

To delete an API key:

1. On the menu bar, click **Settings** and, in the **INTEGRATION** section of the left pane, click **API keys**.
2. On the **API keys** page, next to the API key you want to delete, click **More actions** ![More actions icon](https://doc.sitecore.com/api/markdown-image/ch-one/en/developers/content-hub-one/images/more-actions-chone.png) > **Delete**.
3. Confirm the deletion.