Update User
Endpoints
Update User
Update an existing user’s information
PUT
Update User
Endpoint
Path Parameters
Unique user identifier.Example:
0f4df2de-fffb-4a24-9891-381ecf4f0f87Request Body
User’s email address. Must be a valid email format.Validation:
- Required
- Must be a valid email address
jdoe@jdoe.comUser’s first name.Validation:
- Required
- Max length: 100 characters
JaneUser’s last name.Validation:
- Required
- Max length: 100 characters
Doe IIUser’s role in the system.Validation:
- Required
- Must be one of:
ADMIN,USER,GUEST
ADMINWhether the user account is active.Validation:
- Required
trueResponse
Unique identifier for the user.Example:
0f4df2de-fffb-4a24-9891-381ecf4f0f87The user’s username (unchanged).Example:
jdoeThe updated email address.Example:
jdoe@jdoe.comThe updated first name.Example:
JaneThe updated last name.Example:
Doe IIThe updated role.Example:
ADMINISO 8601 timestamp when the user was created (unchanged).Example:
2024-01-15T10:30:00ISO 8601 timestamp when the user was last updated.Example:
2024-01-15T10:35:00Whether the user account is active.Example:
trueStatus Codes
User updated successfully
Validation error - one or more required fields are missing or invalid
User with the specified ID does not exist
An unexpected error occurred
Example Request
Example Response
Error Response Examples
Validation Error (400)
User Not Found (404)
Notes
- The
usernamefield is immutable and cannot be changed after user creation - The
updatedAttimestamp is automatically updated when changes are made - Setting
activetofalsedeactivates the user account without deleting it