Skip to content

Create an admin user.

POST
/api/admin/admins
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/admin/admins \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "[email protected]", "name": "Admin User", "mfa_enabled": true }'

Create an Admin Console user in DB_ADMIN. The optional password is hashed server-side before storage.

X-Tenant-Id
string

Tenant selector for multi-tenant admin requests.

Media type application/json
object
email
required
string format: email
name
string
password
string format: password
mfa_enabled
boolean
key
additional properties
Example
{
"email": "[email protected]",
"name": "Admin User",
"mfa_enabled": true
}

Admin Console user response.

Media type application/json
object
id
required
string
tenant_id
required
string
email
required
string format: email
name
string | null
status
required
string
Allowed values: active suspended locked
is_active
required
boolean
mfa_enabled
boolean
last_login_at
integer | null format: int64
created_at
required
integer format: int64
updated_at
required
integer format: int64
key
additional properties
Example
{
"id": "admin_123",
"tenant_id": "default",
"email": "[email protected]",
"name": "Admin User",
"status": "active",
"is_active": true,
"mfa_enabled": true,
"last_login_at": 1770000000,
"created_at": 1770000000,
"updated_at": 1770000000
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}