Publishable API Keys

Learn how to create and manage publishable API keys in the vendor dashboard.

On this page

In this guide, you'll learn how to create and manage publishable API keys in the vendor dashboard.

This guide is mainly useful for developers and technical teams building customizations for your store.

What is a Publishable API Key?

A publishable API key is a client key scoped to one or more sales channels. When you build a storefront, you must pass a publishable API key in the request headers indicating the sales channel to scope the request to. This impacts the products retrieved, available stock quantities, and other data.

To learn how to use a publishable API key in your storefront, refer to Getting started and Use a Publishable API Key.


View Publishable API Keys

To view publishable API keys, go to Settings → Publishable API Keys.

Here, you can see a list of all the publishable API keys you have set up. You can also search, filter, and sort the API keys to find the one you are looking for.

Publishable API keys list


Create Publishable API Key

To create a publishable API key:

  1. Go to Settings → Publishable API Keys.
  2. Click Create in the main section's header.
  3. In the form that opens, enter the publishable API key's title.
  4. When you're done, click Save.

Create publishable API key form


View Publishable API Key Details

To view the details of a publishable API key:

  1. Go to Settings → Publishable API Keys.
  2. Click a publishable API key from the list.

This opens the publishable API key's details page where you can also manage the API key.

Publishable API key details page

Publishable API Key Status

You can see the status of the publishable API key in the header of the first section on the details page. A publishable API key's status can be:

StatusDescription
ActiveThe API key can be used in storefront requests.
RevokedThe API key has been revoked and can no longer be used.

Copy Publishable API Key

To copy a publishable API key:

  1. Go to the publishable API key's details page.
  2. In the first section, click the truncated key to copy it to your clipboard.

Copy publishable API key


Edit Publishable API Key

To edit a publishable API key:

  1. Go to the publishable API key's details page.
  2. Click the three-dot menu in the first section's header.
  3. Choose Edit from the dropdown.
  4. In the side window that opens, edit the publishable API key's title.
  5. When you're done, click Save.

Edit publishable API key form


Manage Publishable API Key's Sales Channels

You can manage the sales channels of a publishable API key on its details page. By adding sales channels to the publishable API key, it becomes part of the scope in requests made with the key.

Add Sales Channels

To add a sales channel to a publishable API key:

  1. Go to the publishable API key's details page.
  2. Click Add in the Sales Channels section header.
  3. In the list that opens, check the sales channels you want to add the API key to.
  4. When you're done, click Save.

Add sales channels form

Remove Sales Channels

To remove a sales channel from a publishable API key:

  1. Go to the publishable API key's details page.
  2. Check the sales channel you want to remove in the Sales Channels section.
  3. Press R or click Remove at the bottom center of the page.
  4. Confirm by clicking Continue.

Remove sales channels from publishable API key


Revoke Publishable API Key

Revoking a publishable API key is irreversible. You can't use the key in requests after revoking it or reactivate it.

To revoke a publishable API key:

  1. Go to the publishable API key's details page.
  2. Click the three-dot menu in the first section's header.
  3. Choose Revoke API key from the dropdown.
  4. Confirm by clicking Revoke API key in the pop-up.

Delete Publishable API Key

Deleting a publishable API key is irreversible.

You can only delete a publishable API key after revoking it. To delete a publishable API key:

  1. Go to the publishable API key's details page.
  2. Click the three-dot menu in the first section's header.
  3. Choose Delete from the dropdown.
  4. Confirm by clicking Delete in the pop-up.