---
title: "Cancel KMS Key Deletion"
method: POST
path: "/kms-key/{id}/cancel-deletion"
tags: ["kms-key"]
---

# Cancel KMS Key Deletion

`POST /kms-key/{id}/cancel-deletion`

## Request

- Base URL: `https://api-ch-gva-2.exoscale.com/v2`
- URL: `https://api-ch-gva-2.exoscale.com/v2/kms-key/{id}/cancel-deletion`
- Auth: none declared
- TypeScript: <https://skmtc.dev/exoscale/apis/exoscale-api/docs/kms-key/:id/cancel-deletion/post.ts> (a function with typed inputs; its response is checked against the schema)

Cancels the scheduled deletion of a KMS Key.

## Path parameters

- `id` string, uuid, required

## Response `200`

Key deletion cancelled

- SuccessResponse
  - `status` 'success' | 'target-registered' | 'already-applied', required

## Other responses

- `400`: ### Errors Key Not Found: The request was rejected because the specified KMS Key could not be found. Not on Replica: The request was rejectde because the operation is not allowed on a replica. Not Pending Deletion: The request was rejected because the key is not pending deletion.

## Changes

- **2026-11-06** `63da6f74c845`: 4 warning
  - removed the optional property `errors` from the response with the `400` status
  - removed the optional property `instance` from the response with the `400` status
  - added the new `already-applied` enum value to the `status` response property for the response status `200`
  - added the new `target-registered` enum value to the `status` response property for the response status `200`
- **2026-03-16** `e05707a7b346`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/exoscale/apis/exoscale-api/changes/kms-key/:id/cancel-deletion/post.md)

---

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