---
title: "Create a new API key"
method: POST
path: "/api/v1/api-keys"
---

# Create a new API key

`POST /api/v1/api-keys`

## Request

- Base URL: `https://anyhook.net`
- URL: `https://anyhook.net/api/v1/api-keys`
- Auth: HTTP bearer

Creates a new API key. The full key value is returned only once in the response , store it securely.

## Request body

- object
  - `name` string, required: Human-readable label for this API key.

## Response `201`

API key created. The key field is shown once only , store it securely.

- object
  - `key` string: Full API key value. Shown once only.
  - `id` string, uuid
  - `prefix` string

## Other responses

- `400`: Validation error (name required, 1-50 chars)
- `401`: Unauthorized
- `429`: Rate limit exceeded. Check Retry-After header.

---

[API](https://skmtc.dev/anyhook/apis/anyhook-api.md) · [All operations](https://skmtc.dev/anyhook/apis/anyhook-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anyhook/apis/anyhook-api/revisions/ddf038fb32fc?raw)
