---
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}`

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v1/realms/{realmId}/consumers/{consumerId}/keys/{keyId}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
- TypeScript: <https://skmtc.dev/kong/apis/konnect-api/docs/v1/realms/:realmId/consumers/:consumerId/keys/:keyId/delete.ts> (a function with typed inputs; its response is checked against the schema)

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

## Changes

- **2025-06-27** `9f695af25102`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/konnect-api/changes/v1/realms/:realmId/consumers/:consumerId/keys/:keyId/delete.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api.md) - [All operations](https://skmtc.dev/kong/apis/konnect-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/konnect-api/revisions/f018071a4515?raw)
