---
title: "Revoke an API key"
description: "Stop a pkgplane API key from working, either for now (disable) or for good (delete)."
---

> Documentation Index
> Fetch the complete documentation index at: https://pkgplane-docs.richaisolutions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoke an API key

Revoke a key when you stop using it, or as soon as you think someone else has seen it. pkgplane gives
you two ways:

|                            | Disable                  | Delete  |
| -------------------------- | ------------------------ | ------- |
| The key stops working      | At once                  | At once |
| You can undo it            | Yes, enable it again     | No      |
| The key stays in your list | Yes, marked **Disabled** | No      |

Disable a key you might need back, or one you want to keep a record of. Delete a key that leaked.

## Disable or delete the key

1. Open [API keys](https://pkgplane.richaisolutions.com/api-keys).
2. Find the key by its name, or by the first characters of the key in the **Key** column.
3. Open its actions menu, select **Disable** or **Delete**, then confirm with **Disable key** or
   **Delete key**.

## Check it no longer works

```sh
curl -i -H "Authorization: Bearer $PKGPLANE_API_KEY" https://pkgplane.richaisolutions.com/api/me
```

The API now answers `401 Unauthorized`.

If the key leaked, also replace it: [create a new key](https://pkgplane-docs.richaisolutions.com/guides/create-an-api-key/) and update the
secret wherever the old one was stored.

Source: https://pkgplane-docs.richaisolutions.com/guides/revoke-an-api-key/index.mdx
