POST/pet/{petId}

Update a pet with form data

Updates a pet's name or status using form data. Supply the pet identifier in petId and use the optional name and status query parameters for the values to change.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

3 parameters
petIdintegerrequired
The int64 identifier of the pet to update.
namestringoptional
The pet's new name.
statusstringoptional
The pet's new status in the store.

3 status codes
200Returns the pet record, including its name, photo URLs, and any category, tags, and status.
idintegeroptional
namestringrequired
categoryobjectoptional
photoUrlsarray<string>required
tagsarray<object>optional
statusstringoptional
pet status in the store
Allowed:availablependingsold
400Returned when the input is invalid.
defaultUnexpected error

Error handling

Invalid input returns a 400. The petId path parameter identifies the pet to update; name and status are optional query parameters.