Skip to content

Create Api Key

POST
/v1/settings/api-keys
curl --request POST \
--url https://example.com/v1/settings/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example" }'

A key acting as you, with your role, sent as Authorization: Bearer rl_…. The key itself is returned only this once.

Media typeapplication/json
ApiKeyRequest
object
name
required
Name
string

Example generated

{
"name": "example"
}

Successful Response

Media typeapplication/json
NewApiKey
object
api_key
required
ApiKey
object
id
required
Id
string
name
required
Name
string
created_at
required
Created At
string format: date-time
last_used_at
required
Any of:
string format: date-time
key
required
Key

The key itself, rl_…. It is shown only this once.

string

Example generated

{
"api_key": {
"id": "example",
"name": "example",
"created_at": "2026-04-15T12:00:00Z",
"last_used_at": "2026-04-15T12:00:00Z"
},
"key": "example"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}