---
title: "Create API key"
method: POST
path: "/api-keys"
tags: ["API Keys"]
---

# Create API key

`POST /api-keys`

## Request body

- object
  - `name` string

## Response `201`

API key created

- object
  - `id` string, required
  - `fullKey` string, required
  - `name` string, required
  - `prefix` string, required
  - `createdAt` string, date-time, required

## Other responses

- `401` — Unauthenticated
- `403` — API key limit reached
- `429` — Xquik tier rate limit exceeded. The response includes a `Retry-After` header with the number of seconds to wait before retrying.

## Changes

- **2026-07-22** `37e31f0b5439` — 128 warning
  - added the new `body_too_large` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `429`
  - added the new `body_too_large` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #2: StructuredError]/code` response property for the response status `429`
  - added the new `body_too_large` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `401`
  - added the new `body_too_large` enum value to the `error/oneOf[subschema #2: StructuredError]/code` response property for the response status `401`
  - …124 more
  - …this revision’s changelog is incomplete
- **2026-07-13** `83005363f122` — 2 breaking, 31 info
  - added `subschema #1: LegacyErrorCode, subschema #2: StructuredError` to the `error` response property `oneOf` list for the response status `401`
  - the `error` response's property type/format changed from `string`/`` to ``/`` for status `401`
  - the endpoint scheme security `cookieSession` was added to the API
  - the endpoint scheme security `apiKey` was removed from the API
  - …29 more
- …earlier changes not shown

[Full history](https://skmtc.dev/xquik-dev/apis/xquik-api/changes/api-keys/post.md)

---

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