Skip to Content
SettingsDeveloper SettingsPublishable API Keys

Manage Publishable API Keys

In this guide, you’ll learn how to create and manage publishable API keys in the admin.

Note: This section is mainly useful for developers and technical teams building custom storefronts or integrations.


What is a Publishable API Key?

A publishable API key is a client-side key scoped to one or more sales channels.
When building a storefront, you must include a publishable API key in your request headers to identify which sales channel the request is associated with.
This determines which products, stock levels, and data are returned.

Refer to the API Reference for details on how to pass the publishable API key in request headers.


View Publishable API Keys

To view the list of publishable API keys in your store:

  1. Go to Settings → Publishable API Keys.
  2. Here, you’ll find a list of all publishable API keys.
    You can search, filter, or sort the keys to locate a specific one.

Create Publishable API Key

To create a new publishable API key:

  1. Go to Settings → Publishable API Keys.
  2. Click Create in the top-right corner.
  3. In the form that opens:
    • Enter the title for the API key.
  4. Click Save.

View Publishable API Key Details

To view details of a publishable API key:

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

This opens the key’s details page, where you can manage its configuration and status.


Publishable API Key Status

The key’s status is displayed in the header of the details page.

StatusDescription
ActiveThe API key is active and can be used in 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 details page of the key.
  2. Click on the truncated key in the first section to copy it to your clipboard.

Edit Publishable API Key

To edit a publishable API key:

  1. Go to the key’s details page.
  2. Click the ⋮ (three dots) in the first section’s header.
  3. Choose Edit from the dropdown.
  4. In the side panel that opens, update the title.
  5. Click Save.

Manage Publishable API Key’s Sales Channels

You can manage which sales channels a publishable API key applies to.
When a sales channel is added, the key’s scope includes that channel in API requests.

Add Sales Channels

  1. Go to the API key’s details page.
  2. Click Add in the Sales Channels section.
  3. In the list that opens, check the channels you want to add.
  4. Click Save.

Remove Sales Channels

  1. Go to the API key’s details page.
  2. In the Sales Channels section, check the box next to the channel you want to remove.
  3. Press R or click the Remove button at the bottom of the page.
  4. Confirm the removal by clicking Continue.

Revoke Publishable API Key

Warning: Revoking a publishable API key is irreversible.
Once revoked, it can no longer be used in API requests and cannot be reactivated.

To revoke a publishable API key:

  1. Go to the API key’s details page.
  2. Click the ⋮ (three dots) in the first section’s header.
  3. Choose Revoke API key from the dropdown.
  4. Confirm by clicking Revoke API key in the confirmation pop-up.

Delete Publishable API Key

Warning: Deleting a publishable API key is irreversible.
You can only delete a key after it has been revoked.

To delete a publishable API key:

  1. Go to the key’s details page.
  2. Click the ⋮ (three dots) in the first section’s header.
  3. Choose Delete from the dropdown.
  4. Confirm deletion by clicking Delete in the pop-up.

Last updated on