Mint an API key
Alpha
POST
https://api.voxrouter.ai/v1/keysCreate a new `pk_*` API key under the caller's organization (or personal account if no org). Any org member can mint a key; the new row records the caller as the creator. Requires a `vr_session_*` token from `voxrouter login`. The full key value is returned **once** — store it immediately; the API will never expose it again.
bash
curl -X POST https://api.voxrouter.ai/v1/keys \
-H "Authorization: Bearer $VOXROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string"
}'Headers
AuthorizationstringRequiredBearer token. Send as
Authorization: Bearer pk_....Content-TypestringRequiredMust be
application/json.Body
namestringRequiredHuman-readable label for the key.
Response
API key created — `keyValue` is the secret to store.
Returns raw application/json bytes.
Errors
Non-2xx responses return a JSON body with a machine-readable error code and an optional details string.
| Status | Meaning |
|---|---|
| 400 | Request body failed validation or model string is malformed. |
| 401 | Missing or invalid API key. |
| 403 | The caller belongs to more than one organization, so org scope cannot be inferred. The CLI must select an org explicitly with `voxrouter org use <slug>` before retrying. |