Skip to main content

Add a new pet

Add a new pet to the store's database.

POST https://petstore3.swagger.io/api/v3/pet

Examples

cURL
POST "https://petstore3.swagger.io/api/v3/pet" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "api_key: <YOUR_API_KEY>" \
-d '{
"id": 0,
"name": "string",
"category": {
"id": 0,
"name": "string"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}'

Responses

CodeDescription
200Successful operation
400Invalid input
404Pet not found
422Validation exception
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

Request body
NameTypeDescription
bodyPet objectRequired. The Pet object to add to the store.