PUT/user/{username}

Replace a user

Replaces a user resource with the supplied user details. The request body is optional, and the schema does not mark any body fields as required. Only the authenticated user can perform this operation.

1 parameter · 8 body fields
usernamestringrequired

The username of the user to update.

User details to apply to the existing account; all fields are optional.

emailstringoptional

The user's email address.

firstNamestringoptional

The user's first name.

idintegeroptional

The user's identifier as an int64 integer.

lastNamestringoptional

The user's last name.

passwordstringoptional

The user's password.

phonestringoptional

The user's phone number.

userStatusintegeroptional

User Status

usernamestringoptional

The user's username.

4 status codes
200Confirms that the user was updated.
400Returned when the request is invalid.
404Returned when the user to update is not found.
defaultUnexpected error

Error handling

A 400 is returned when the request is invalid. A 404 is returned when the user to update is not found. The username path parameter identifies the user to replace.