Create and manage API keys

Create a key with only the permissions a program needs, set when it expires, and revoke it when the program stops.

Guide
About 3 minutes

What you'll do

Create an API key for one program, copy it once, and later change when it expires or revoke it.

Before you start

  • You are a workspace Owner or Admin. Other members see only a note and a link to these pages.
  • The workspace is on Pro or Enterprise. On the free plan the page says API keys are part of Pro.
  • You know which actions the program needs. Permissions lists the permission for each.

Steps

  1. Select your name at the bottom of the sidebar, then Settings, then API keys.
  2. Select Create API key.
  3. Type a Name that says what the program does, such as "Nightly supplier import".
  4. Under Permissions, tick only the permissions the program needs.
  5. Select Create API key.
  6. Select Copy and close, and store the key in your program's secret store.

What happens next

The key appears in the list with its Name, Secret key, Created, Last used and Expires columns. It works at once, and every change it makes carries its name.

You cannot change a key's permissions later. To give a program more, create a new key and revoke the old one.

Set when a key expires

Open the key's actions menu and select Edit expiration. Choose in 1 hour, in 24 hours, in 3 days, in 7 days or Never, then select Save changes. Once it expires, the key stops working.

Revoke a key

Open the key's actions menu, select Revoke key, and confirm with Revoke key. The key stops working at once, and its requests answer 401 invalid_key. You cannot undo this.

If something goes wrong

"Only workspace admins and owners can manage API keys." Ask an Owner or Admin to create the key.

"Could not load the keys." Reload the page.

A program gets 401 invalid_key. The key was revoked, has expired, or was copied in part. Create a new key.