> ## Documentation Index
> Fetch the complete documentation index at: https://infisical.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete a key

> Delete a KMS key with the Node.js SDK.

`client.kms().keys().delete()` deletes a key from a [KMS](https://infisical.com/docs/documentation/platform/kms/overview.md) project.

> [!WARNING]
>
> If you delete a key, you can't decrypt any data that the key encrypted.

## Parameters

**options** `DeleteKmsKeyOptions` *required*

**properties**

**keyId** `string` *required*

The ID of the key.

## Returns

**key** `KmsKey`

The deleted key.

```typescript Basic theme={"dark"}
const key = await client.kms().keys().delete({ keyId: "<key-id>" });
```

```json Response theme={"dark"}
{
  "id": "8c9d0e1f-2a3b-4c4d-9e5f-6a7b8c9d0e1f",
  "name": "payments-data",
  "description": "",
  "projectId": "5e8d7c6b-4a3f-4e2d-9c1b-0a9f8e7d6c5b",
  "orgId": "2c1b0a9f-8e7d-4c6b-5a4f-3e2d1c0b9a8f",
  "keyUsage": "encrypt-decrypt",
  "encryptionAlgorithm": "aes-256-gcm",
  "version": 1,
  "isDisabled": false,
  "createdAt": "2026-12-02T11:20:08.774Z",
  "updatedAt": "2026-12-02T11:20:08.774Z"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.