API Keys
Create API Key
POST/v1/keys
Create a new API key for programmatic access to scoring endpoints. API keys can be scoped to specific permissions and environments.
Important: The full API key is only returned once at creation time. Store it securely immediately — it cannot be retrieved again. Only the key prefix will be shown in subsequent API responses.
Authentication: JWT token. Requires role:
owner or admin.Body Parameters
namestringrequired
A descriptive name for the API key (e.g. "Production Scoring - LOS Integration").
scopesstring[]optional
Permissions granted to this key. Available scopes: score (invoke scoring endpoints), read (read deployment stats). Defaults to ["score"].
environmentstringoptional
Restrict this key to a specific environment. One of "production" or "staging". If omitted, the key works in both environments.
Error Responses
401unauthorized
JWT is missing or expired.
403insufficient_role
Your role does not have permission to create API keys.
422invalid_scope
One or more provided scopes are not recognized.
Create API Key
curl -X POST https://api.cali-br.com/v1/keys \
-H #a5d6ff">"Authorization: Bearer eyJhbGciOiJSUzI1NiIs..." \
-H #a5d6ff">"Content-Type: application/json" \
-d '{
#a5d6ff">"name": "Production Scoring - LOS Integration",
#a5d6ff">"scopes": ["score", "read"],
#a5d6ff">"environment": "production"
}'Response201
{
"id": "key_m8Xp2nQw",
"name": "Production Scoring - LOS Integration",
"key": "sk_live_abc123def456ghi789jkl012mno345pqr678",
"prefix": "sk_live_abc1",
"scopes": ["score", "read"],
"environment": "production",
"created_at": "2026-03-26T15: 30: 00Z"
}