---
sidebar_label: "Manage Publishable API Keys"
tags:
    - user guide
    - api key
products:
    - api key
---

import { Table } from "docs-ui"
import { EllipsisHorizontal } from "@medusajs/icons"

export const metadata = {
  title: `Manage Publishable API Keys in Medusa Admin`,
}

# {metadata.title}

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

<Note>

This guide is mainly useful for developers and technical teams building customizations for a Medusa application.

</Note>

## 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 pass the publishable API key in request headers, refer to the [API Reference](!api!/store#publishable-api-key).

---

## View Publishable API Keys

To view the publishable API keys in the Medusa Admin, go to Settings -> Publishable API Keys.

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

![Publishable API keys list](https://res.cloudinary.com/dza7lstvk/image/upload/v1740489989/User%20Guide/Screenshot_2025-02-25_at_3.26.09_PM_xmpxdw.png)

---

## Create Publishable API Key

To create a new publishable API key:

1. Go to Settings -> Publishable API Keys.
2. Click the Create button at the top right.
3. In the form that opens, enter the publishable API key's title.
4. Once you're done, click the Save button.

![Create publishable API key form](https://res.cloudinary.com/dza7lstvk/image/upload/v1740490166/User%20Guide/Screenshot_2025-02-25_at_3.28.44_PM_aosbhw.png)

---

## View Publishable API Key Details

To view the details of a publishable API key:

1. Go to Settings -> Publishable API Keys.
2. Click on 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](https://res.cloudinary.com/dza7lstvk/image/upload/v1740490244/User%20Guide/Screenshot_2025-02-25_at_3.30.35_PM_bgcl23.png)

### Publishable API Key Status

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

<Table>
  <Table.Header>
    <Table.Row>
      <Table.HeaderCell>Status</Table.HeaderCell>
      <Table.HeaderCell>Description</Table.HeaderCell>
    </Table.Row>
  </Table.Header>
  <Table.Body>
    <Table.Row>
      <Table.Cell>Active</Table.Cell>
      <Table.Cell>The API key is active and can be used in requests.</Table.Cell>
    </Table.Row>
    <Table.Row>
      <Table.Cell>Revoked</Table.Cell>
      <Table.Cell>The API key has been revoked and can't be used in requests.</Table.Cell>
    </Table.Row>
  </Table.Body>
</Table>

---

## 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 on the truncated key to copy it to your clipboard.

![Copy publishable API key](https://res.cloudinary.com/dza7lstvk/image/upload/v1740500116/User%20Guide/Screenshot_2025-02-25_at_6.14.15_PM_muwq9e.png)

---

## Edit Publishable API Key

To edit a publishable API key:

1. Go to the publishable API key's details page.
2. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three-dots" /> at the top right of the first section.
3. Choose "Edit" from the dropdown.
4. In the side window that opens, you can edit the publishable API key's title.
5. Once you're done, click the Save button.

![Edit publishable API key form](https://res.cloudinary.com/dza7lstvk/image/upload/v1740490481/User%20Guide/Screenshot_2025-02-25_at_3.34.28_PM_hxppxj.png)

---

## Manage Publishable API Key's Sales Channels

You can manage the sales channels of a publishable API key in 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 the "Add" button at the top right of the "Sales Channels" section.
3. In the list that opens, check the sales channels you want to add the API key to.
4. Once you're done, click the Save button.

![Add sales channels form](https://res.cloudinary.com/dza7lstvk/image/upload/v1740490636/User%20Guide/Screenshot_2025-02-25_at_3.37.05_PM_ontnzy.png)

### 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 checkbox next to the sales channel you want to remove in the "Sales Channels" section.
3. Press <Kbd>R</Kbd> or click the Remove button at the bottom center of the page.
4. Confirm removing the sales channels by clicking the Continue button.

![Remove sales channels from publishable API key](https://res.cloudinary.com/dza7lstvk/image/upload/v1740490931/User%20Guide/Screenshot_2025-02-25_at_3.38.41_PM_pmlbqk.png)

---

## Revoke Publishable API Key

<Note type="warning">

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

</Note>

To revoke a publishable API key:

1. Go to the publishable API key's details page.
2. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three-dots" /> at the top right of the first section.
3. Choose "Revoke API key" from the dropdown.
4. Confirm revoking the API key by clicking the "Revoke API key" button in the pop-up.

---

## Delete Publishable API Key

<Note type="warning">

Deleting a publishable API key is irreversible.

</Note>

You can only delete a publishable API key after [revoking it](#revoke-publishable-api-key). To delete a publishable API key:

1. Go to the publishable API key's details page.
2. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three-dots" /> at the top right of the first section.
3. Choose "Delete" from the dropdown.
4. Confirm deleting the API key by clicking the Delete button in the pop-up.
