Skip to content

Update User

PATCH
/api/users/{user_id}

Update user (superuser only).

Unlike the self-service PATCH /me, a superuser MAY change email directly (a support/ops action, not a self-service one — still subject to the same uniqueness check, but skips the new-address-verification flow since an admin action already carries a different trust level). Uses SuperuserUserUpdate rather than UserUpdate: the former has no password field, so there’s no dead setattr(user, “password”, …) on a column that doesn’t exist (User only has hashed_password).

Authorizations

Parameters

Path Parameters

user_id
required
string format: uuid

Request Body required

Admin-only user update — unlike UserUpdate, superusers MAY change a user’s email directly (support/ops action), still subject to the same uniqueness check as the self-service path.

object
email
Any of:
string format: email
full_name
Any of:
string
<= 255 characters
is_active
Any of:
boolean
is_superuser
Any of:
boolean
timezone
Any of:
string
username
Any of:
string
>= 3 characters <= 50 characters

Responses

200

Successful Response

User response schema

object
created_at
required
string format: date-time
email
required
string format: email
full_name
required
Any of:
string
id
required
string format: uuid
is_active
required
boolean
is_superuser
boolean
is_verified
required
boolean
last_login
required
Any of:
string format: date-time
organization_id
Any of:
string format: uuid
timezone
Any of:
string
username
required
string

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string