Skip to content

Create API key

POST
/api/v1/auth/api_keys

Create a new API key for the authenticated user. The secret key is returned only once — store it securely.

CreateApiKeyRequest
object
name
required
Name

Label for this API key

string

Successful Response

CreatedApiKeyResponse
object
id
required
Id
integer
name
required
Name
string
is_active
required
Is Active
boolean
created_at
required
Created At
string format: date-time
key
required
Key

The API key — shown only once at creation

string

Bad Request

ErrorResponse
object
detail
Any of:
string
error
Any of:
string
error_code
Any of:
string

Not Found

ErrorResponse
object
detail
Any of:
string
error
Any of:
string
error_code
Any of:
string

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string

Internal Server Error

ErrorResponse
object
detail
Any of:
string
error
Any of:
string
error_code
Any of:
string