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

# Create Api Key

`POST /v1/api-keys`

## Request

- Base URL: `https://api.rmfg.com`
- URL: `https://api.rmfg.com/v1/api-keys`
- Auth: HTTP bearer

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-11-02** `078f984358b9`: 1 warning, 1 info
  - added the new `admin` enum value to the `scopes/items/` response property for the response status `201`
  - added the new `admin` enum value to the request property `scopes/items/`
- **2026-09-06** `b7e901150c5c`: 1 info
  - endpoint added

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

---

[API](https://skmtc.dev/rmfg/apis/rmfg-manufacturing-api.md) - [All operations](https://skmtc.dev/rmfg/apis/rmfg-manufacturing-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rmfg/apis/rmfg-manufacturing-api/revisions/078f984358b9?raw)
