Admin

Update User

Update a user's fields and/or role (admin only).

patch/admin/users/{user_id}

Request

  • The document declares no server URL.
  • Auth: one of:
    • OAuth 2 (password, token URL /api/auth/login)
    • API key in header X-Api-Key
    • API key in query parameter api_key

Path parameters

user_idstring uuid required

Request body

emailstring email nullable

New email address. Set to update, send null or an empty string to clear it, omit to leave unchanged.

is_activeboolean nullable

Legacy account-state toggle. False maps to 'deactivated' and true maps to 'active'. Prefer the explicit status field.

status'active' | 'suspended' | 'deactivated' nullable

Explicit account lifecycle state. Pending registrations must use the approve/reject endpoints.

rolestring nullable

New role: 'admin', 'editor', or 'viewer'. Omit to leave unchanged.

Response

Successful Response

idstring uuid required
usernamestring required
emailstring nullable required
is_activeboolean required
status'active' | 'pending' | 'suspended' | 'deactivated' required

Account status: active, pending, suspended, or deactivated.

last_login_atstring date-time nullable required
created_atstring date-time required
rolesstring[] required

Assigned role names, e.g. ['admin', 'editor']

can_reset_passwordboolean required

Whether an administrator can set a local password for this account. True for local accounts even when an identity provider is also linked.

Changes

No recorded changes to this operation across all 50 revisions of this API.