---
title: "Decrypt"
method: POST
path: "/kms-key/{id}/decrypt"
tags: ["crypto"]
---

# Decrypt

`POST /kms-key/{id}/decrypt`

## Request

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

Decrypts a ciphertext.

## Path parameters

- `id` string, uuid, required

## Request body

- DecryptRequest
  - `encryption-context` string, byte, nullable: The exact Base64-encoded Additional Authenticated Data (AAD) used during encryption to verify data integrity.
  - `ciphertext` string, byte, required: The Base64-encoded ciphertext payload to be decrypted.

## Response `200`

Base64 encoded plaintext.

- DecryptResponse
  - `plaintext` string, byte, required: The recovered Base64-encoded original plaintext payload.

## Other responses

- `400`: ### Errors Key Not Found: The request was rejected because the specified KMS Key could not be found. Key is Disabled: The request was rejected because the specified KMS key is disabled. Invalid Usage: The request was rejected because the operation is only allowed on symmetric keys with usage "encrypt-decrypt".

## Changes

- **2026-11-06** `63da6f74c845`: 2 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
- **2026-03-16** `e05707a7b346`: 1 info
  - endpoint added

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