1 ---
2 sidebar_label: "Manage Secret API Keys"
3 tags:
4 - user guide
5 - api key
6 products:
7 - api key
8 ---
9
10 import { Table } from "docs-ui"
11 import { EllipsisHorizontal } from "@medusajs/icons"
12
13 export const metadata = {
14 title: `Manage Secret API Keys in Medusa Admin`,
15 }
16
17 # {metadata.title}
18
19 In this guide, you'll learn how to create and manage secret API keys in the Medusa Admin.
20
21 <Note>
22
23 This guide is mainly useful for developers and technical teams building customizations for a Medusa application.
24
25 </Note>
26
27 ## What is a Secret API Key?
28
29 A secret API key is an authentication token that allows you to access Medusa's Admin APIs. You can pass it in request headers to send requests as an authenticated admin user. So, it's important to not expose the secret API key in client-side code or public repositories.
30
31 To learn how to pass the secret API key in request headers, refer to the [API Reference](!api!/admin#2-api-token).
32
33 ---
34
35 ## View Secret API Keys
36
37 To view the secret API keys of the currently logged-in user in the Medusa Admin, go to Settings -> Secret API Keys.
38
39 Here, you can see a list of all the secret API keys for the logged-in user. You can also search, filter, and sort the API keys to find the one you are looking for.
40
41 ![Secret API keys list](https://res.cloudinary.com/dza7lstvk/image/upload/v1740491442/User%20Guide/Screenshot_2025-02-25_at_3.49.04_PM_asthgc.png)
42
43 ---
44
45 ## Create Secret API Key
46
47 When you create a secret API key, you create it for the currently logged-in user.
48
49 <Note>
50
51 Prior to [Medusa v2.11.0], users could only have one active secret API key at a time. To create a new secret API key, you had to [revoke](#revoke-secret-api-key) the existing key first. If you can't create multiple secret API keys, request your technical team to [upgrade your Medusa application](!docs!/learn/update).
52
53 </Note>
54
55 To create a new secret API key for the currently logged-in user:
56
57 1. Go to Settings -> Secret API Keys.
58 2. Click the Create button in the main section's header.
59 3. In the form that opens, enter the secret API key's title.
60 4. Once you're done, click the Save button.
61 5. You'll get a pop-up with the secret API key. Copy it and store it securely before closing the pop-up, as you won't be able to see it again.
62
63 ![Create secret API key form](https://res.cloudinary.com/dza7lstvk/image/upload/v1740495860/User%20Guide/Screenshot_2025-02-25_at_5.04.07_PM_u91vm5.png)
64
65 ---
66
67 ## View Secret API Key Details
68
69 To view the details of a secret API key:
70
71 1. Go to Settings -> Secret API Keys.
72 2. Click on a secret API key from the list.
73
74 This opens the secret API key's details page where you can also manage the API key.
75
76 ![Secret API key details page](https://res.cloudinary.com/dza7lstvk/image/upload/v1740496080/User%20Guide/Screenshot_2025-02-25_at_5.07.49_PM_oqt9mf.png)
77
78 ### Secret API Key Status
79
80 You can see the status of the secret API key in the header of the first section in the details page. A secret API key's status can be:
81
82 <Table>
83 <Table.Header>
84 <Table.Row>
85 <Table.HeaderCell>
86 Status
87 </Table.HeaderCell>
88 <Table.HeaderCell>
89 Description
90 </Table.HeaderCell>
91 </Table.Row>
92 </Table.Header>
93 <Table.Body>
94 <Table.Row>
95 <Table.Cell>Active</Table.Cell>
96 <Table.Cell>The API key is active and can be used in requests.</Table.Cell>
97 </Table.Row>
98 <Table.Row>
99 <Table.Cell>Revoked</Table.Cell>
100 <Table.Cell>The API key has been revoked and can't be used in requests.</Table.Cell>
101 </Table.Row>
102 </Table.Body>
103 </Table>
104
105 ---
106
107 ## Edit Secret API Key
108
109 To edit a secret API key:
110
111 1. Go to the secret API key's details page.
112 2. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three-dots" /> in the first section's header.
113 3. Choose "Edit" from the dropdown.
114 4. In the side window that opens, you can edit the secret API key's title.
115 5. Once you're done, click the Save button.
116
117 ![Edit secret API key form](https://res.cloudinary.com/dza7lstvk/image/upload/v1740496144/User%20Guide/Screenshot_2025-02-25_at_5.08.53_PM_o4h3cn.png)
118
119 ---
120
121 ## Revoke Secret API Key
122
123 <Note type="warning">
124
125 Revoking a secret API key is irreversible. You can't use the key in requests after revoking it or reactivate it.
126
127 </Note>
128
129 To revoke a secret API key:
130
131 1. Go to the secret API key's details page.
132 2. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three-dots" /> in the first section's header.
133 3. Choose "Revoke API key" from the dropdown.
134 4. Confirm revoking the API key by clicking the "Revoke API key" button in the pop-up.
135
136 ---
137
138 ## Delete Secret API Key
139
140 <Note type="warning">
141
142 Deleting a secret API key is irreversible.
143
144 </Note>
145
146 You can only delete a secret API key after [revoking it](#revoke-secret-api-key). To delete a secret API key:
147
148 1. Go to the secret API key's details page.
149 2. Click the <InlineIcon Icon={EllipsisHorizontal} alt="three-dots" /> in the first section's header.
150 3. Choose "Delete" from the dropdown.
151 4. Confirm deleting the API key by clicking the Delete button in the pop-up.