Swagger Petstore - OpenAPI 3.0
PUT/user/{username}

Update a user account

Replaces the specified user's account details. The authenticated user must identify the account with username and may provide updated user fields in JSON, XML, or form-encoded form. A successful response confirms that the user resource was updated.

1 parameter · 8 body fields
usernamestringrequired
The username identifying the user to update.

Updated user account details accepted as JSON, XML, or application/x-www-form-urlencoded data.

idintegeroptional
The user's 64-bit integer identifier.
usernamestringoptional
The username for the account.
firstNamestringoptional
The user's first name.
lastNamestringoptional
The user's last name.
emailstringoptional
The user's email address.
passwordstringoptional
The password for the account.
phonestringoptional
The user's telephone number.
userStatusintegeroptional
User Status

4 status codes
200Confirms that the user resource was updated successfully.
400Returned when the update request is invalid.
404Returned when no user exists with the supplied `username`.
defaultUnexpected error

Error handling

A 400 is returned when the update request is invalid. A 404 is returned when username does not identify an existing user; any supplied id must be a 64-bit integer and userStatus must be a 32-bit integer.