PUT/user/{username}

Replace a user record

Replaces the user record identified by the username path parameter with the submitted user object. Provide the fields to store in the body; the schema does not mark any individual field as required.

1 parameter · 8 body fields
usernamestringrequired

The name of the user to update.

User account details for the update. The body and all individual fields are optional in the schema.

emailstringoptional

The user's email address.

firstNamestringoptional

The user's first name.

idintegeroptional

The user's integer identifier, in int64 format.

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
200Returns confirmation that the user was updated.
400Returned when the update request is invalid.
404Returned when no user is found with the supplied username.
defaultUnexpected error

Error handling

A 400 is returned when the update request is invalid. A 404 is returned when no user is found for the username path parameter; provide the user record's username in the path.