---
title: "Generate a new API key"
method: POST
path: "/api/v1/operator/keys"
tags: ["operator"]
---

# Generate a new API key

`POST /api/v1/operator/keys`

## Request body

- CreateKeyDto
  - `name` string, required — Human-readable label for this API key

## Response `200`

- ApiKeyCreatedDto
  - `plainKey` string, required — Plain-text key — shown ONCE, never returned again
  - `keyId` string, required
  - `keyPrefix` string, required

## Changes

- **2026-04-10** `280a966f6587` — 2 breaking, 1 info
  - added required request body
  - removed the success response with the status `201`
  - added the success response with the status `200`
- **2026-03-14** `bcb7c5bf7ca6` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/humbleaf/apis/agentchain-prior-api/changes/api/v1/operator/keys/post.md)

---

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