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

# POST /api/v1/api-keys

`POST /api/v1/api-keys`

## Request

- Base URL: `https://xquik.com`
- URL: `https://xquik.com/api/v1/api-keys`
- Auth: API key in cookie `__Host-xquik_session`

Creates a revocable API key and returns its secret once.

## Request body

- object
  - `name` string: Up to 100 characters. An empty or missing name saves the key as Default.

## 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, or an API key or OAuth token sent instead of a dashboard session
- `429`: Too many requests right now. Each user gets 500 reads a second. Each minute allows 120 writes & 60 deletes. `x_api_rate_limited` means X limits this read for now. Neither answer costs anything. Wait for the seconds in `Retry-After`, then retry.
- `500`: Unexpected error.
- `4XX`: Client error. The error code says what to fix.
- `default`: Unexpected error.

## Changes

- **2026-10-20** `45942c75fdc2`: 12 warning
  - added the new `topup_in_progress` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `429`
  - added the new `topup_in_progress` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #2: StructuredError]/code` response property for the response status `429`
  - added the new `topup_in_progress` enum value to the `anyOf[#/components/schemas/Error]/error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `403`
  - added the new `topup_in_progress` enum value to the `anyOf[#/components/schemas/Error]/error/oneOf[subschema #2: StructuredError]/code` response property for the response status `403`
  - …8 more

[Operation history](https://skmtc.dev/xquik-dev/apis/xquik-api/changes/api/v1/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.dev/xquik-dev/apis/xquik-api/revisions/45942c75fdc2?raw)
