---
title: "Create Key"
method: POST
path: "/api/v1/agents/{agent_id}/keys"
tags: ["api-keys"]
---

# Create Key

`POST /api/v1/agents/{agent_id}/keys`

## Path parameters

- `agent_id` string, uuid, required

## Headers

- `Authorization` string, nullable
- `X-Request-ID` string, nullable

## Request body

- APIKeyCreate
  - `name` string, nullable

## Response `201`

Successful Response

- APIKeyCreatedResponse
  - `key` string, required
  - `name` string, nullable, required
  - `agent_id` string, uuid, required
  - `agent_url` string, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-27** `b20a3bdd6219` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/xenovia/apis/controlplane/changes/api/v1/agents/:agent_id/keys/post.md)

---

[API](https://skmtc.dev/xenovia/apis/controlplane.md) · [All operations](https://skmtc.dev/xenovia/apis/controlplane/llms.txt) · [OpenAPI document](https://skmtc.dev/xenovia/apis/controlplane/revisions/b20a3bdd6219?raw)
