Search docs

Find any page, endpoint, or guide.

Mint an API key

Alpha
POSThttps://api.voxrouter.ai/v1/keys

Create 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

AuthorizationstringRequired
Bearer token. Send as Authorization: Bearer pk_....
Content-TypestringRequired
Must be application/json.

Body

namestringRequired
Human-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.

StatusMeaning
400Request body failed validation or model string is malformed.
401Missing or invalid API key.
403The 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.