# Leaked Unkey Root Key? Delete It and Audit API Keys

> Unkey root key in a repo or CI file? Delete it under Root Keys, review the API keys it created and deploy a scoped replacement. Step-by-step guide.

Source: https://leakwatch.net/secrets/unkey-root-key

---

[LeakWatch](/)

[Product](/product)[Live feed](/leaks)[Guides](/secrets)[Blog](/blog)[Free scan](/)

1.  [Home](/)
2.  [Secrets](/secrets)
3.  Unkey Root Key

Databases & keys · Secret guide

# Leaked Unkey Root Key: what to do in the first hour

High severityDetected onlyLast verified November 5, 2026 · 5 min read

An Unkey root key is a management credential for Unkey, the service that issues and verifies API keys for other applications. A root key has permission to act on the Unkey workspace it belongs to, which can include creating, editing and deleting the API keys that your own customers or services depend on. Whoever holds a root key therefore sits one step above the keys it manages. A leak needs a fast response, because the attacker can mint new keys for themselves or disable the keys your users rely on. Delete the root key first, then review what it created.

[Check your GitHub account for leaked secrets — free](/)

Provider

Unkey

Severity

High

Impact

Source code and build access

Checked live by LeakWatch

No

## What an Unkey Root Key looks like

Unkey root keys begin with `unkey_`, followed by a string of letters and digits of moderate length:

```text
unkey_…XXXX   Unkey root key (masked)
```

The `unkey_` prefix is specific to Unkey, so a match is worth taking seriously. Root keys are different from the API keys that Unkey issues to your customers. A customer key is used to call your own API, and it is limited to what that customer may do. A root key is used to manage Unkey itself, and it is limited only by the permissions it was given when it was created. The name of the key in your dashboard can help you tell them apart, but check the permissions shown for it before you decide how wide the review should be.

A root key is usually stored in a deployment variable or in a script that creates or verifies keys during a sign-up flow. It is one of the credentials that should be used only on a server, never in a browser or a mobile app.

## How Unkey Root Keys get leaked

-   **Server code committed by accident.** A file that calls the Unkey API with the root key typed in, pushed to a repository that was public at some point.
-   **Deployment files.** A container or serverless configuration that writes the root key into the image, or into a file that is copied to a public location.
-   **Front-end code.** A root key placed in a browser script or a mobile app, which exposes it to every user of the product.
-   **Build logs.** A CI step that prints its environment, or a debug option that echoes the request headers sent to Unkey.
-   **Shared scripts.** An administration or migration script with the key typed in, sent to a colleague or posted to a support thread.

## What to do in the first hour

1.  **Delete the root key.** Open the Root Keys settings in the Unkey dashboard, find the key that leaked and delete it. Deletion is immediate and permanent, and any application that uses the key loses access straight away.
2.  **Review the keys it created.** Look at the API keys in your workspace for the period since the root key may have been exposed. Remove any key you did not create, and check the permissions and the owner of each key that looks unfamiliar.
3.  **Check the audit logs.** Unkey’s documentation recommends reviewing the audit logs for unauthorized activity after a leak. Look for keys created, edited or deleted, and for verification calls from unexpected places.
4.  **Create a replacement root key** with only the permissions the service needs. A service that only verifies keys does not need the permission to delete them. Store the new key in your secret manager or in the deployment’s secret settings.
5.  **Deploy the replacement** and confirm that key verification still works for your customers before you move on.
6.  **Clean the code.** Remove the value from the files and the history, and check for older copies. See [I accidentally pushed an API key to GitHub](/blog/i-accidentally-pushed-an-api-key-to-github).

Not sure what else leaked from the same project? [Run a free scan](/).

[Not sure what else leaked? Run a free scan.](/)

## Revoke it at Unkey

Unkey documents root keys under the workspace settings, in a Root Keys section. Open the Root Keys settings, find the key by its name and delete it. Unkey’s documentation describes deletion as immediate and permanent, and it also describes a rotation action that can keep the old key valid for a grace period, which you can use if you need time to deploy. Unkey’s documentation on root keys is a useful reference. The exact labels in the current dashboard could not be confirmed for this guide, so follow what the settings page shows you.

## How LeakWatch detects it

The rule is called “Unkey Root Key”. It looks for the prefix `unkey_`, followed by between twenty and thirty-two letters or digits, and the match must end at a quote, a space, a semicolon, a line break or the end of the line. A value cut short, or with a different prefix, is not reported. The severity is **high**, with the impact class for identity and code access. **This type is not checked live**: LeakWatch does not call Unkey with the key it finds.

LeakWatch detects this format but does **not** check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.

## FAQ

Is a root key the same as a key my customers use?

No. Customers use keys that your own API issues, and those keys are limited to what the customer may do. A root key manages the Unkey workspace and can create or delete keys. Treat a leaked root key as far more serious than a leaked customer key.

Can I rotate instead of deleting?

Unkey’s documentation describes a rotation action with a grace period for the old key. That is useful if you need time to deploy, but if the leak is active, delete the old key so that it stops working at once.

Do I need to tell my customers?

Check first what the leaked key could have changed. If the audit logs show keys created or deleted, or customer keys that stopped working, you may have an incident to explain to the people who depend on those keys.

## Related

-   [Auth0 Management API Token](/secrets/auth0-management-api-token)
-   [Okta API Token](/secrets/okta-api-token)
-   [Algolia Admin API Key](/secrets/algolia-admin-api-key)
-   [I accidentally pushed an API key to GitHub](/blog/i-accidentally-pushed-an-api-key-to-github)
-   [Which vendors leak most this week](/leaks/trends)
-   [All secret guides](/secrets)

[Get alerted next time a secret leaks — create a free account](/)

LeakWatch is not affiliated with Unkey.

![Gabriel Diyan, founder of LeakWatch](/brand/Photo-Gabriel-Diyan.webp)

Gabriel Diyan (0xCr0c0)

Cybersecurity student, founder of LeakWatch. I built and run the scanner described here — the detection patterns, the false-positive classifier and the provider validators are mine. [More about who I am](/about).

[GitHub](https://github.com/Leakwatch-Scan) · [X](https://x.com/LeakwatchScan) · [LinkedIn](https://www.linkedin.com/in/gabriel-diyan-80a378375) · [GitHub (personal)](https://github.com/crocogab)

LeakWatch

Secrets leak into public commits every minute. This watches the forges for yours. Built and run by [Gabriel Diyan](/about), a cybersecurity student — [why LeakWatch exists](/about).

Scan

-   [Product](/product)
-   [Live feed](/leaks)
-   [Trends](/leaks/trends)
-   [API docs](/docs)
-   [CI/CD](/docs?tab=ci)

Read

-   [Blog](/blog)
-   [Secret guides](/secrets)
-   [Changelog](/changelog)
-   [About](/about)

Verify

-   [Security](/security)
-   [Privacy](/privacy)
-   [Terms](/terms)
-   [Legal](/legal)
-   [Contact](/contact)
-   [Status](https://status.leakwatch.net)

© 2026 LeakWatch

[GitHub](https://github.com/Leakwatch-Scan)[X](https://x.com/LeakwatchScan)
