v2

latestOpenAPI 3.1.02026-08-05267431678.1 KB
api-keys

Create Api Key

Create a new API key for the authenticated user.

Only JWT-authenticated (browser session) requests are permitted — API key creation via an existing API key is blocked to prevent credential chaining.

Args: request: The incoming FastAPI request (used by SlowAPI rate limiter). body: The API key creation request payload. auth: The authenticated user context.

Returns: CreateAPIKeyResponse with the secret key (shown only once).

Raises: HTTPException: 403 if called via API key or the active team's plan does not include API keys, 409 if the team API-key cap is reached, 500 for unexpected failures.

post/create-api-key

Request body

namestring required

Name for the API key

expires_atstring nullable

Optional expiration timestamp (ISO 8601). Sentinel strings like 'never' are accepted and treated as no expiration.

team_idstring nullable

Team to bind the key to. Defaults to the caller's active team when omitted; an explicit value must equal the active team.

captcha_tokenstring nullable

hCaptcha response token for bot verification

Response

Successful Response

idstring required
namestring required
api_key_last_digitsstring required
created_atstring required
expires_atstring nullable
team_idstring required
secret_keystring required
stripe_customer_createdboolean