POST
/
api
/
v1
/
kms
/
keys
curl --request POST \
  --url https://us.infisical.com/api/v1/kms/keys \
  --header 'Content-Type: application/json' \
  --data '{
  "projectId": "<string>",
  "name": "<string>",
  "description": "<string>",
  "encryptionAlgorithm": "aes-256-gcm"
}'
{
  "key": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "description": "<string>",
    "isDisabled": false,
    "orgId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "projectId": "<string>",
    "version": 1,
    "encryptionAlgorithm": "<string>"
  }
}

Body

application/json
projectId
string
required

The ID of the project to create the key in.

name
string
required

The name of the key to be created. Must be slug-friendly.

Required string length: 1 - 32
description
string

An optional description of the key.

Maximum length: 500
encryptionAlgorithm
enum<string>
default:
aes-256-gcm

The algorithm to use when performing cryptographic operations with the key.

Available options:
aes-256-gcm,
aes-128-gcm

Response

200
application/json
Default Response
key
object
required