---
title: "Revoke API key"
method: DELETE
path: "/api/api-keys/{key_id}"
tags: ["api-keys"]
---

# Revoke API key

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

Revokes an API key so it can no longer authenticate. The key remains visible as inactive.

## Path parameters

- `key_id` string, required — ID of the API key to revoke

## Response `200`

Successful Response

- DeletionResponse — Empty acknowledgment returned when an operation succeeds.

## Other responses

- `401` — Missing, invalid, or expired credentials.
- `403` — The credentials are valid but not authorized for this operation — for example an API key whose action or library scope excludes it, or a credential type this operation does not accept.
- `404` — Not found
- `422` — Validation Error
- `429` — Rate limit exceeded. Retry after the interval in the `Retry-After` header.

## Changes

- **2026-08-08** `815e0302a988` — 1 breaking, 1 info
  - response property `detail` list-of-types was widened by adding types `string` to media type `application/json` of response `422`
  - the response property `detail` became required for the status `422`
- **2026-08-05** `c3e15c78f2da` — 4 info
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
  - added the non-success response with the status `404`
  - added the non-success response with the status `429`
- **2026-08-05** `6397cb5a99c5` — 2 info
  - api operation id `delete_api_key_api_api_keys__key_id__delete` removed and replaced with `delete_api_key`
  - the endpoint scheme security `clerkSession` was added to the API
- **2026-05-18** `9af798cdc7db` — 1 breaking, 1 info
  - removed the success response with the status `204`
  - added the success response with the status `200`

[Change history](https://skmtc.dev/gumnut-ai/apis/gumnut-api/changes/api/api-keys/:key_id/delete.md)

---

[API](https://skmtc.dev/gumnut-ai/apis/gumnut-api.md) · [All operations](https://skmtc.dev/gumnut-ai/apis/gumnut-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gumnut-ai/gumnut-api/revisions/2c3aca3a6e6d/schema)
