Skip to content

Create a user (admin only)

POST
/api/v1/auth/users
curl --request POST \
--url https://example.com/api/v1/auth/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "hello@example.com", "full_name": "example", "password": "example", "role": "admin" }'
Media typeapplication/json
UserCreate
object
email
required
Email
string format: email
full_name
required
Full Name
string
>= 1 characters <= 255 characters
password
required
Password
string
>= 8 characters <= 128 characters
role
UserRole
string
default: viewer
Allowed values: admin risk_officer viewer

Successful Response

Media typeapplication/json
object
success
required
boolean
default: true
data
required
UserRead
object
id
required
Id
string format: uuid
email
required
Email
string format: email
full_name
required
Full Name
string
role
required
UserRole
string
Allowed values: admin risk_officer viewer
is_active
required
Is Active
boolean
is_system
Is System

True for the synthetic principal used when AUTH_DISABLED is set.

boolean
created_at
required
Created At
string format: date-time

Example

{
"success": true,
"data": {
"role": "admin",
"is_system": false
}
}

Unauthorized

Media typeapplication/json
ErrorResponse
object
error
required
ErrorDetail
object
code
required
Code
string
message
required
Message
string
details
Details
correlation_id
Correlation Id
Any of:
string

Example

{
"error": {
"code": "not_found",
"correlation_id": "0f4b9a2e-6c2b-4f0e-9a4a-1c2b3d4e5f60",
"message": "AI system not found."
}
}

Forbidden

Media typeapplication/json
ErrorResponse
object
error
required
ErrorDetail
object
code
required
Code
string
message
required
Message
string
details
Details
correlation_id
Correlation Id
Any of:
string

Example

{
"error": {
"code": "not_found",
"correlation_id": "0f4b9a2e-6c2b-4f0e-9a4a-1c2b3d4e5f60",
"message": "AI system not found."
}
}

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": {}
}
]
}