POST/pet/{petId}

Update a pet using form data

Updates a pet record in the store using form parameters. Pass the petId path parameter and provide name or status as query parameters to change those values. A 200 response returns the updated pet object.

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

3 parameters
petIdintegerrequired

The integer identifier of the pet to update.

namestringoptional

The pet's new name.

statusstringoptional

The pet's new store status.

3 status codes
200Returns the updated pet object, including its identifier, name, photo URLs, status, category, and tags.
categoryobjectoptional
idintegeroptional
namestringrequired
photoUrlsarray<string>required
statusstringoptional

pet status in the store

Allowed:availablependingsold
tagsarray<object>optional
400Returned when the input is invalid.
defaultUnexpected error

Error handling

The petId path parameter identifies the pet to update. A 400 is returned when the input is invalid; the name and status query parameters can be omitted when you do not want to update those values.