---
title: "Create a dek"
method: POST
path: "/dek-registry/v1/keks/{name}/deks"
tags: ["Data Encryption Keys (v1)"]
---

# Create a dek

`POST /dek-registry/v1/keks/{name}/deks`

## Path parameters

- `name` string, required

## Request body

- CreateDekRequest
  - `subject` string — Subject of the dek
  - `version` integer — Version of the dek
  - `algorithm` 'AES128_GCM' | 'AES256_GCM' | 'AES256_SIV' — Algorithm of the dek
  - `encryptedKeyMaterial` string — Encrypted key material of the dek
  - `deleted` boolean — Whether the dek is deleted

## Response `200`

The create response

## Other responses

- `409` — Conflict. Error code 40971 -- Key already exists. Error code 40972 -- Too many keys.
- `422` — Error code 42271 -- Invalid key
- `500` — Error code 50070 -- Dek generation error

---

[API](https://skmtc.dev/confluent/apis/confluent-cloud-apis.md) · [All operations](https://skmtc.dev/confluent/apis/confluent-cloud-apis/llms.txt) · [OpenAPI document](https://skmtc.dev/confluent/apis/confluent-cloud-apis/revisions/83f5e4fbfe08?raw)
