Skip to main content
POST
/
api
/
me
/
api-keys
Create API Key
curl --request POST \
  --url https://your-domain.com/api/me/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Production Integration",
  "scopes": "chat,agents,kb",
  "expires_at": "2025-12-31T23:59:59Z"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "key": "<string>",
  "key_prefix": "<string>",
  "scopes": "<string>",
  "expires_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API Key (fim_xxx) or JWT token

Body

application/json
name
string
required

Key name (1-100 characters)

scopes
string | null

Comma-separated scopes (optional)

expires_at
string<date-time> | null

Expiration date (optional)

Response

API key created successfully

id
string
name
string
key
string

Full API key — only returned at creation time

key_prefix
string
scopes
string | null
expires_at
string<date-time> | null
created_at
string<date-time>