---
title: "Purge Api Key"
method: DELETE
path: "/api/auth/api-keys/{key_id}/permanent"
tags: ["auth"]
---

# Purge Api Key

`DELETE /api/auth/api-keys/{key_id}/permanent`

## Request

- Base URL: `https://kernelscan.io`
- URL: `https://kernelscan.io/api/auth/api-keys/{key_id}/permanent`
- Auth: none declared

Hard-delete a revoked API key, removing the audit row entirely.

Soft revocation (`DELETE /api-keys/{id}`) is the default — it preserves
the row so prefix and last-used timestamp stay visible for audit. This
endpoint physically removes the row, but only for keys that are already
revoked, to prevent accidental loss of an active credential.

## Path parameters

- `key_id` string, required

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/kernelscan/apis/kernelscan-api.md) · [All operations](https://skmtc.dev/kernelscan/apis/kernelscan-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kernelscan/apis/kernelscan-api/revisions/4fa51d41484e?raw)
