Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

docs: clarify that creating new API keys does not disable legacy keys (#47395)

Wen Bo Xie5c3d25014015
diff --git a/apps/docs/content/guides/getting-started/api-keys.mdx b/apps/docs/content/guides/getting-started/api-keys.mdx
index 3ca3976f52a..b1cff12b380 100644
--- a/apps/docs/content/guides/getting-started/api-keys.mdx
+++ b/apps/docs/content/guides/getting-started/api-keys.mdx
@@ -32,6 +32,12 @@ There are 4 types of API keys that you can use with Supabase:
| <span className="whitespace-nowrap!">`anon`</span> | JWT (long lived) | Low | <span className="whitespace-nowrap!">Platform, CLI</span> | Legacy version of publishable keys. |
| <span className="whitespace-nowrap!">`service_role`</span> | JWT (long lived) | Elevated | <span className="whitespace-nowrap!">Platform, CLI</span> | Legacy version of secret keys. |
+<Admonition type="note" title="Creating new keys does not revoke your legacy keys">
+
+Both key types work simultaneously. Creating publishable and secret keys adds them _alongside_ your existing `anon` and `service_role` keys without affecting them — your legacy keys keep working. They remain valid until you explicitly disable them in the [**Settings > API Keys**](/dashboard/project/_/settings/api-keys/) section of the Dashboard which is a separate step. See [Migrating to new API keys](/docs/guides/getting-started/migrating-to-new-api-keys) for the full process.
+
+</Admonition>
+
<$Partial path="api_keys_deprecation.mdx" />
## Publishable keys
diff --git a/apps/studio/components/interfaces/APIKeys/CreateNewAPIKeysButton.tsx b/apps/studio/components/interfaces/APIKeys/CreateNewAPIKeysButton.tsx
index 2e4e591c63c..bb22c34e828 100644
--- a/apps/studio/components/interfaces/APIKeys/CreateNewAPIKeysButton.tsx
+++ b/apps/studio/components/interfaces/APIKeys/CreateNewAPIKeysButton.tsx
@@ -66,7 +66,10 @@ export const CreateNewAPIKeysButton = () => {
<AlertDialogDescription>
This will create a default publishable key and a default secret key both named{' '}
<code className="break-keep! text-code-inline">default</code>. These keys are required
- to connect your application to your Supabase project.
+ to connect your application to your Supabase project. Your existing legacy API keys (
+ <code className="break-keep! text-code-inline">anon</code> and{' '}
+ <code className="break-keep! text-code-inline">service_role</code>) are not affected and
+ remain valid until you disable them in a separate step.
</AlertDialogDescription>
</AlertDialogHeader>
{error && (