---
title: "Mint a new live API key"
method: POST
path: "/v1/keys"
tags: ["Key Management"]
---

# Mint a new live API key

`POST /v1/keys`

## Request

- Base URL: `https://api.nashboard.ai`
- URL: `https://api.nashboard.ai/v1/keys`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Required scope: `keys:write`. Requested scopes must be a subset of the calling key's own scopes (403 scope_escalation otherwise). The plaintext key is returned ONCE — store it immediately.

## Headers

- `X-Nashboard-Version` '2026-06-13'

## Request body

- KeyCreateRequest
  - `name` string
  - `scopes` string[], required: Requested scopes — must be a subset of the calling key's own scopes (403 scope_escalation otherwise).
  - `expires_in_days` integer: TTL in days. Omit for non-expiring key.

## Response `201`

Key minted. Plaintext returned once.

- KeyCreated
  - `id` string, uuid, required
  - `key` string, required: Plaintext API key (nsh_live_…). Returned ONCE — store immediately.
  - `prefix` string, required
  - `name` string, nullable
  - `scopes` string[], required
  - `expires_at` string, date-time, nullable, required
  - `created_at` string, date-time, required

## Other responses

- `400`: Bad request (invalid JSON, invalid ID, invalid cursor, etc.)
- `401`: Missing, malformed, or invalid API key.
- `403`: Insufficient scope or scope escalation attempt.
- `404`: Resource not found.
- `409`: Conflict (e.g. email already taken).
- `413`: Request body too large.
- `415`: Unsupported media type.
- `422`: Request body failed schema validation.
- `429`: Rate limited, quota exceeded, or DP budget exhausted.
- `500`: Internal server error.
- `502`: Upstream dependency error (e.g. receipt image storage unavailable — code storage_failure).

---

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