---
title: "Revoke Api Key"
method: DELETE
path: "/admin/keys/{key_id}"
tags: ["Admin"]
---

# Revoke Api Key

`DELETE /admin/keys/{key_id}`

## Request

- Base URL: `https://api.kolens.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.kolens.ai/admin/keys/{key_id}`
- Auth: none declared

Soft-delete: mark the key inactive. Bearer-auth checks already
filter on ``is_active = True``, so a revoke takes effect on the
next request. We never hard-delete because the row is referenced
by ``DBSearchJob.api_key`` / ``DBGrowthAlert.api_key`` and
cascading the FK is more dangerous than keeping a tombstone.

## Path parameters

- `key_id` string, required

## Headers

- `x-admin-secret` string, nullable

## Response `204`

Successful Response

## Other responses

- `422`: Validation Error

---

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