POST
/petCreate a pet in the store
Creates a new pet in the store. Supply name and photoUrls; status, if provided, must be one of the accepted values. The response includes the created pet details.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Pet details to create, supplied as JSON, XML, or form data. name and photoUrls are required.
idintegeroptional
The pet's numeric identifier.
namestringrequired
The pet's name.
categoryobjectoptional
The pet's category, with an identifier and name.
photoUrlsarray<string>required
A list of URLs for the pet's photos.
tagsarray<object>optional
A list of tags, each with an identifier and name.
statusstringoptional
pet status in the store
200Returns the pet object, including its identifier, name, category, photo URLs, tags, and status.
idintegeroptional
namestringrequired
categoryobjectoptional
photoUrlsarray<string>required
tagsarray<object>optional
statusstringoptional
pet status in the store
400Returned when the input is invalid.
422Returned when the request fails validation.
defaultUnexpected error
Error handling
A 400 is returned for invalid input, and a 422 for a validation exception. name and photoUrls are required; status, if provided, must be available, pending, or sold.