SuperDocs Demo

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

Path Parameters

Path Parameters

id required
integer

The unique identifier of the user to update

Request Body

All fields are optional. Only provided fields will be updated.

Body Parameters

name
string

Full name of the user

email
string

Email address. Must be a valid email format.

username
string

Unique username

phone
string

Phone number

website
string

Personal 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

StatusDescription
400Invalid request body
401Unauthorized - missing or invalid authentication
404User not found
Try it out
PUT /users/{id}
Authorization
Bearer Token