Skip to content

Users API

List Users

Responses

StatusDescriptionSchema
200Successful Responseany

Create User

Request body (required), application/json, UserIn

FieldTypeRequiredDescription
display_namestring | nullno
emailstringyes
passwordstringyes
rolestringno

Responses

StatusDescriptionSchema
201Successful Responseany
422Validation ErrorHTTPValidationError

Delete User

RBAC: admin. No entitlement flag.

Delete an account outright.

Prefer PATCH is_active=false: audit rows carry actor_id, and deleting the user makes every action they ever took unattributable. This exists for the account that should never have been created.

Parameters

NameInTypeRequiredDescription
user_idpathintegeryes

Responses

StatusDescriptionSchema
200Successful Responseany
422Validation ErrorHTTPValidationError
404user not found
409self_delete, or last_owner

Patch User

RBAC: admin. No entitlement flag.

Deactivate or reactivate an account, or fix its display name.

Deactivation rather than deletion is the normal path: it keeps the user’s audit rows attributable, which deletion cannot.

Setting is_active: false revokes every live session for that user immediately.

Parameters

NameInTypeRequiredDescription
user_idpathintegeryes

Request body (required), application/json, UserPatchIn

FieldTypeRequiredDescription
display_namestring | nullno
is_activeboolean | nullno

Responses

StatusDescriptionSchema
200Successful Responseany
422Validation ErrorHTTPValidationError
404user not found
409self_deactivate, or last_owner
422nothing to change

Reset Password

RBAC: admin. No entitlement flag.

Set another user’s password.

An admin-set password is a recovery mechanism, not a login: every existing session is revoked so a stolen cookie cannot outlive the reset. The old password is never required, which is precisely why this is (“user”,“manage”) and audited.

Revokes every live session for the user. Does NOT clear TOTP enrollment: the second factor is the user’s, not the admin’s.

Parameters

NameInTypeRequiredDescription
user_idpathintegeryes

Request body (required), application/json, PasswordResetIn

FieldTypeRequiredDescription
passwordstringyes

Responses

StatusDescriptionSchema
200Successful Responseany
422Validation ErrorHTTPValidationError
404user not found