Skip to content

addPet

POST
/pets
curl --request POST \
--url https://petstore.swagger.io/v2/pets \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "tag": "example" }'

Creates a new pet in the store. Duplicates are allowed

Pet to add to the store

Media type application/json
object
name
required
string
tag
string
Example generated
{
"name": "example",
"tag": "example"
}

Pet response

Media type application/json
object
name
required
string
tag
string
id
required
integer format: int64
Example generated
{
"name": "example",
"tag": "example",
"id": 1
}

Unexpected error

Media type application/json
object
code
required
integer format: int32
message
required
string
Example generated
{
"code": 1,
"message": "example"
}