Create API Key
For new integrations we recommend OAuth clients or the SDK instead of long-lived API keys — short-lived tokens, scope narrowing, and no long-lived secret to store. See the Authentication guide. This endpoint remains fully supported; the examples below authenticate with a minted OAuth access token (
$TOKEN).Request Body
The
key_type is set automatically based on the host the request is sent to and cannot be specified in the request body. Requests to api.knoxcall.com produce a standard key; requests to sandbox.knoxcall.com produce a test key.Response
Permissions on the new key
A key created with norole_ids holds no policy, and is therefore
default-denied on every policy-gated endpoint — it authenticates, then 403s.
That is the platform default since the legacy *:* auto-attach was retired, and
it is almost never what you want.
List the roles you can attach with
GET /v1/roles?subject_kind=api_key and pass
their ids: