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

# Create Key

`POST /v1/api-keys`

## Request

- Base URL: `https://api.theagentc.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.theagentc.io/v1/api-keys`
- Auth: HTTP bearer

## Request body

- ApiKeyCreate
  - `name` string

## Response `201`

Successful Response

- ApiKeyCreated
  - `id` string, uuid, required
  - `name` string, required
  - `prefix` string, required
  - `created_at` string, date-time, nullable, required
  - `last_used_at` string, date-time, nullable, required
  - `key` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/theagentc/apis/the-agent-c-api.md) · [All operations](https://skmtc.dev/theagentc/apis/the-agent-c-api/llms.txt) · [OpenAPI document](https://skmtc.dev/theagentc/apis/the-agent-c-api/revisions/1c9868b44584?raw)
