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

# Schedule KMS Key Deletion

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

## Request

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

Schedules a KMS key for deletion after a delay. You can specify a delay of 7-30 days.

## Path parameters

- `id` string, uuid, required

## Request body

- ScheduleKmsKeyDeletionRequest
  - `delay-days` integer: Number of days to wait until deletion is final.

## Response `200`

Key deletion scheduled

- ScheduleKmsKeyDeletionResponse
  - `delete-at` string, date-time: Timestamp of the key deletion

## Other responses

- `400`: ### Errors Key Not Found: The request was rejected because the specified KMS Key could not be found. Not on Default: The request was rejected because the operation is not allowed on the default key. Not on Replica: The request was rejectde because the operation is not allowed on a replica. Bad Request: The request was rejected because of an invalid request body or path parameter.

## Changes

- **2026-11-06** `63da6f74c845`: 1 breaking, 2 warning, 1 info
  - removed the required property `status` from the response with the `200` status
  - 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 optional property `delete-at` to the response with the `200` status
- **2026-03-16** `e05707a7b346`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/exoscale/apis/exoscale-api/changes/kms-key/:id/schedule-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)
