Update User
This can only be done by the logged in user.
Request
URI
PUT
https://petstore3.swagger.io/user/{username}
COPY
Path Parameters
string
username
Required
name that need to be deleted
Request Body
Update an existent user in the store
User
of type(s)
application/json
Optional
{
"id": 10,
"username": "theUser",
"firstName": "John",
"lastName": "James",
"email": "[email protected]",
"password": "12345",
"phone": "12345",
"userStatus": 1
}
integer As int64
As int64
id
Optional
id
string
username
Optional
username
string
firstName
Optional
firstName
string
lastName
Optional
lastName
string
email
Optional
string
password
Optional
password
string
phone
Optional
phone
integer As int32
As int32
userStatus
Optional
User Status
Responses
200
successful operation
Operation doesn't return any data structure
400
bad request
Operation doesn't return any data structure
404
user not found
Operation doesn't return any data structure
default
Unexpected error
Returns
Error
of type(s)
application/json
"Error Object"
string
code
Required
code
string
message
Required
message
Code Samples
COPY
curl -X PUT -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/user/{username}