POST
Create Api Key
The full key is only returned once at creation. Store it immediately in a secrets manager or environment variable тАФ it cannot be retrieved again.

Authentication

This endpoint accepts either credential. If you already have an API key, you can mint another one with it:

Bootstrapping your first key

With no key yet, create one in the dashboard under Settings тЖТ API Keys, or тАФ on a self-hosted deployment using local email/password auth тАФ log in for a session token first: Step 1 тАФ Log in to get a session token
The response contains a token field. Use it in the next step. Step 2 тАФ Create an API key
The new key is prefixed bibha_. Use it as X-API-Key: <key> on every subsequent request тАФ see Authentication.

Authorizations

Authorization
string
header
required

Interactive user session: the login JWT, sent as Authorization: Bearer <token>.

Body

application/json
name
string
required
expires_at
string<date-time> | null

Response

Successful Response

id
integer
required
name
string
required
key_prefix
string
required
api_key
string
required
created_at
string<date-time>
required
expires_at
string<date-time> | null