POST
/petCreate a pet
Creates a new pet record in the store from the supplied pet details. Provide name and photoUrls; status, when supplied, must be available, pending, or sold.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Pet details for the new store record. name and photoUrls are required.
categoryobjectoptional
The pet's category, with an integer id and a name.
idintegeroptional
The pet's unique identifier as a 64-bit integer.
namestringrequired
The pet's name.
photoUrlsarray<string>required
URLs for photos of the pet.
statusstringoptional
pet status in the store
tagsarray<object>optional
Tags associated with the pet, each with an integer id and a name.
200Returns the created pet object, including its identifier, name, photo URLs, status, category, and tags.
categoryobjectoptional
idintegeroptional
namestringrequired
photoUrlsarray<string>required
statusstringoptional
pet status in the store
tagsarray<object>optional
400Returned when the input is invalid.
422Returned when the request fails validation.
defaultUnexpected error
Error handling
name and photoUrls are required; omitting either or providing invalid input returns a 400. A 422 indicates a validation exception. If supplied, status must be one of available, pending, or sold.