---
title: "Generate a new key pair and publish the public key"
method: POST
path: "/termix-id/keys/generate"
tags: ["Termix ID"]
---

# Generate a new key pair and publish the public key

`POST /termix-id/keys/generate`

## Request body

- object
  - `type` 'ed25519' | 'rsa'
  - `label` string
  - `saveCredential` boolean
  - `username` string

## Response `201`

Generated key info with private key (shown once)

---

[API](https://skmtc.dev/termix/apis/termix-api.md) · [All operations](https://skmtc.dev/termix/apis/termix-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/termix/termix-api/revisions/f4ef343eff1b/schema)
