Update User
Update an existing user's information
PUT
/users/{id}Overview
Updates an existing user’s information. You can update any subset of fields - only the provided fields will be modified.
Authorization
Warning
This endpoint requires authentication. Include a valid Bearer token in the Authorization header.
Path Parameters
Path Parameters
id requiredThe unique identifier of the user to update
Request Body
All fields are optional. Only provided fields will be updated.
Body Parameters
nameFull name of the user
emailEmail address. Must be a valid email format.
usernameUnique username
phonePhone number
websitePersonal website URL
Response
Returns the updated user object.
Example Request
{ "name": "Jane Doe", "email": "jane@example.com"}Example Response
{ "id": 1, "name": "Jane Doe", "email": "jane@example.com", "username": "Bret", "phone": "1-770-736-8031 x56442", "website": "hildegard.org"}Error Responses
| Status | Description |
|---|---|
400 | Invalid request body |
401 | Unauthorized - missing or invalid authentication |
404 | User not found |
Try it out
PUT
/users/{id} Authorization
Bearer Token