---
title: "Delete a key"
method: DELETE
path: "/v1/realms/{realmId}/consumers/{consumerId}/keys/{keyId}"
tags: ["Centrally Managed Keys"]
---

# Delete a key

`DELETE /v1/realms/{realmId}/consumers/{consumerId}/keys/{keyId}`

Delete a key. This operation removes the key from the system, causing all future authentication
requests using this key to fail. However, it does not immediately invalidate any
cached keys stored in the gateway's state. These keys may remain usable until the cache expires, based on the
TTL (Time-To-Live) configured for the realm.

## Response `204`

success

## Other responses

- `404` — not found

---

[API](https://skmtc.net/kong/apis/konnect-api.md) · [All operations](https://skmtc.net/kong/apis/konnect-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kong/konnect-api/revisions/06734a9c491f/schema)
