Skip to main content
POST
Update User
Updates user information including role, name, email, profile image, and password.

Authentication

Requires admin authentication.

Path Parameters

string
required
The unique identifier of the user to update

Request Body

string
required
User role: admin, user, or pending
string
required
User display name
string
required
User email address (will be converted to lowercase)
string
required
URL to user’s profile image (validated for security)
string
New password for the user (will be hashed). If provided, must meet password requirements.

Response

Returns the updated user object.
string
Unique user identifier
string
Updated email address
string
Username
string
Updated user role
string
Updated display name
string
Updated profile image URL
integer
Unix timestamp of last activity
integer
Unix timestamp of last update
integer
Unix timestamp of creation

Example Request

Example Response

Errors

  • 400 - Email already taken by another user
  • 400 - Password does not meet requirements
  • 400 - User not found
  • 403 - Cannot modify primary admin user (if you’re not the primary admin)
  • 403 - Primary admin cannot change their own role from admin

Notes

  • Email addresses are automatically converted to lowercase
  • Email uniqueness is enforced - returns error if email is already in use by another user
  • Password is validated and hashed securely if provided
  • Primary admin user (first user created) has special protections:
    • Cannot be modified by other admins
    • Cannot change their own role from admin
  • Profile image URLs are validated for security
  • Both user table and auth table are updated when changing email or password