---
title: "Create a Key"
method: POST
path: "/v2/identities/{identifier}/keys"
tags: ["Key Management"]
---

# Create a Key

`POST /v2/identities/{identifier}/keys`

## Request

- The document declares no server URL.
- Auth: HTTP basic

Endpoint to create a new key.

## Path parameters

- `identifier` string, required

## Request body

- CreateKeyRequest
  - `keyType` 'babyjubJub' | 'secp256k1' | 'ed25519', required
  - `name` string, required

## Response `201`

Crated Key

- CreateKeyResponse
  - `id` string, required: base64 encoded keyID

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `500`: Internal Server error

## Changes

- **2025-08-15** `c70318948581`: 1 info
  - added the new `ed25519` enum value to the request property `keyType`
- **2024-12-24** `0b68c34df384`: 1 info
  - endpoint added
- **2024-12-24** `d705ece785fa`: 1 breaking
  - api path removed without deprecation
- **2024-12-19** `f3319728dd7c`: 1 info
  - endpoint added
- **2024-12-17** `96ff718e8ae9`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/0xpolygonid/apis/privado-id-issuer/changes/v2/identities/:identifier/keys/post.md)

---

[API](https://skmtc.dev/0xpolygonid/apis/privado-id-issuer.md) - [All operations](https://skmtc.dev/0xpolygonid/apis/privado-id-issuer/llms.txt) - [OpenAPI document](https://skmtc.dev/0xpolygonid/apis/privado-id-issuer/revisions/8ea65174fe46?raw)
