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 Settings 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 Create API key dialog.

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 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 to copy the key to the clipboard.

  7. Click Open GraphQL IDE to open the integrated development environment (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:

    RequestResponse
    
    {
    "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 > 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 > Delete.

  3. Confirm the deletion.

Do you have some feedback for us?

If you have suggestions for improving this article,