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

# Create Key

`POST /api/v1/account/keys`

## Request

- Base URL: `https://api.billcommons.org`
- URL: `https://api.billcommons.org/api/v1/account/keys`
- Auth: none declared

Item 8 fix: the plan is DERIVED from the customer's current
subscription (same expression `GET /me` uses), not hardcoded to
`"developer"`. Pre-fix, a paying Builder/Scale customer who minted a
SECOND key from `/account` got that key metered at free-tier limits --
`rotate_key` already correctly inherited `old.plan`; this was the one
path that didn't, and it is a straight revenue leak, not a nit.

## Request body

- KeyMintRequest
  - `name` string
  - `environment` 'live' | 'test'

## Response `201`

Successful Response

- KeyRevealResponse
  - `key` string, required
  - `warning` string

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/billcommons/apis/bill-commons-api.md) · [All operations](https://skmtc.dev/billcommons/apis/bill-commons-api/llms.txt) · [OpenAPI document](https://skmtc.dev/billcommons/apis/bill-commons-api/revisions/bfb8cd50a317?raw)
