Skip to main content

Update a pet with form data

Update a pet in the store with form data.

POST https://petstore3.swagger.io/api/v3/pet/{petId}

Examples

cURL
POST "https://petstore3.swagger.io/api/v3/pet/210" \
-H "api_key: <YOUR_API_KEY>" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "name=Krypto" \
--data-urlencode "status=available"

Responses

CodeDescription
200Successful operation
405Invalid input
defaultUnexpected error
Response example

200: Successful operation

Response
{
"id": 210,
"name": "Krypto",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}

Parameters

Path parameters
NameTypeDescription
petIdintegerID of pet to update
Query parameters
NameTypeDescription
namestringName of pet to update
statusstringStatus of pet to update