Skip to content
On this page

Updates a pet in the store with form data.

Updates a pet resource based on the form data.

POST/pet/{petId}Updates a pet in the store with form data.
curl -X POST 'https://petstore3.swagger.io/api/v3/pet/0' \
  -H 'Authorization: Bearer <token>'
Example response · 200
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "status": "available"
}

#Authentication

petstore_authwrite:petsread:pets

#Parameters

petIdinteger (int64)requiredpath

ID of pet that needs to be updated

namestringquery

Name of pet that needs to be updated

statusstringquery

Status of pet that needs to be updated

#Responses

successful operation

application/json application/xml · Type: Pet

idinteger (int64)
namestringrequired
categoryCategory
photoUrlsarray of stringrequired
tagsarray of Tag
statusstring

pet status in the store

Allowed values: "available", "pending", "sold"

{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "status": "available"
}