logo
On this page

Updated user

PUT

https://petstore.swagger.io/v2/user/:username

This can only be done by the logged in user.

Request

Path Parameters

    username stringrequired

    name that need to be deleted

Body

required
Updated user object
    pet object
    oneOf
    category Category
    name string

    Possible values: non-empty

    Category name

    sub object
    Test Sub Category
    prop1 string

    Dumb Property

    name stringrequired

    The name given to a pet

    photoUrls url[]required

    Possible values: <= 20

    The list of URL to a cute photos featuring pet

    friend circular(Pet)
    tags Tag[]required
    Possible values: >= 1
    Tags attached to the pet
  • Array[
  • name string

    Possible values: non-empty

    Tag name

  • ]
  • status string

    Possible values: [available, pending, sold]

    Pet status in the store

    petType string
    Possible values: [cat, dog, bee]
    Type of a pet
    huntingSkill stringrequired

    Possible values: [clueless, lazy, adventurous, aggressive]

    Default value: lazy

    The measured skill for hunting

    username string

    Possible values: >= 4 characters

    User supplied username

    firstName string

    Possible values: non-empty

    User first name

    lastName string

    Possible values: non-empty

    User last name

    email email

    User email address

    password password

    Possible values: >= 8 characters, Value must match regular expression /(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/

    User password, MUST contain a mix of upper and lower case letters, as well as digits

    phone string

    Possible values: Value must match regular expression /^\+(?:[0-9]-?){6,14}[0-9]$/

    User phone number in international format

    userStatus int32

    User status

Responses

Invalid user supplied

1
Copied!
Request
Collapse all
Base URL
https://petstore.swagger.io/v2
Default server
Parameters
pathrequired
Bodyrequired
{
"pet": {
"category": {
"name": "string",
"sub": {
"prop1": "string"
}
},
"name": "Guru",
"photoUrls": [
"string"
],
"friend": {},
"tags": [
{
"name": "string"
}
],
"status": "available",
"petType": {
"huntingSkill": "adventurous"
}
},
"username": "John78",
"firstName": "John",
"lastName": "Smith",
"email": "john.smith@example.com",
"password": "drowssaP123",
"phone": "+1-202-555-0192",
"userStatus": 0
}
RESPONSEClear

Click the "Send" button above and see the response here!

On this page

Back to top