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

# Create Api Key

`POST /v1/api-keys`

Mint a key. The full `key` is returned once, here; only its hash is
stored. Leave `scopes` empty for a key that can do everything.

## Request body

- V1ApiKeyCreateRequest
  - `name` string, required — A label for people.
  - `scopes` string[] — Restrict what the key may call. Empty means every scope. `designs` covers analyze, design reads, models, images, and review links; `dfm`, `quotes`, `carts`, `orders`, and `webhooks` cover those resources. Catalogs need no scope.

## Response `201`

Successful Response

- V1ApiKey — A public API key. `key` appears only in the create response.
  - `id` string, required
  - `object` 'api_key'
  - `name` string, nullable
  - `prefix` string, required — First characters of the key, for display.
  - `scopes` string[]
  - `key` string, nullable — The full key; shown once when created and never stored.
  - `created_at` string, date-time, required
  - `last_used_at` string, date-time, nullable
  - `revoked_at` string, date-time, nullable

## Other responses

- `400` — Malformed request.
- `401` — Missing or invalid credentials.
- `403` — The credentials do not permit this operation.
- `404` — The resource does not exist or is not visible to the caller.
- `409` — The resource is not ready, or Idempotency-Key was reused with a different request.
- `422` — Validation failed; see `error.param` and `error.details`.
- `429` — Rate limit exceeded; retry after the `Retry-After` header.
- `500` — Unexpected failure; safe to retry with the same Idempotency-Key.
- `503` — A dependency is temporarily unavailable; retry later.

## Changes

- **2026-09-06** `b7e901150c5c` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/rmfg/apis/fastapi/changes/v1/api-keys/post.md)

---

[API](https://skmtc.dev/rmfg/apis/fastapi.md) · [All operations](https://skmtc.dev/rmfg/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc.dev/rmfg/apis/fastapi/revisions/737527fc081e?raw)
