Manage API keys using the app

To use the Preview or Delivery API, 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 Integration menu is only visible if you have the Admin role. Each API key is valid for a specific tenant (app) within an organization.

Create an API key

Be sure to copy the generated API key because you cannot view it after you close the New API key window.

To create an API key:

  1. On the menu bar, click Integration > API keys.

  2. On the API keys page, click + Add API key.

  3. In the New API key dialog box, in the Name field, enter a name for the key.

  4. Choose one of the following options:

    • Preview - to use the Preview API. This is for a staging or testing environment and exposes a preview of all content (including drafts).
    • Delivery - to use the Delivery API. This is for a production environment and exposes all published content.
  5. Click Save.

    This generates an API key that you can use with GraphQL.

  6. Click Copy Copy icon. to copy the key to the clipboard.

  7. In the Integrated Development Environment (IDE), click the HTTP HEADERS tab.

  8. Add the API key you just copied using the following format (replacing the example API key):

    RequestResponseshell
    {
    "X-GQL-Token":"aEtSNzBsTaEtSNzBsTaEtSNzBsTaEtSNzBsTaEtSNzBsTBiaDJ6UFZjuT18bXRzdC1kLTAyMA=="
    }

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 Integration > API keys.

  2. On the API keys page, next to the API key you want to edit, click More actions More actions icon. > 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 Integration > API keys.

  2. On the API keys page, next to the API key you want to delete, click More actions More actions icon. > Delete.

  3. Confirm the deletion.

Do you have some feedback for us?

If you have suggestions for improving this article,