Skip to content

Add a new pet to the store.

POST
/pet
curl -X POST 'https://petstore3.swagger.io/api/v3/pet' \
-H 'Content-Type: application/json' \
-d '{"category":{"id":1,"name":"Dogs"},"id":10,"name":"doggie","photoUrls":["string"],"status":"available","tags":[{"id":0,"name":"string"}]}'

Add a new pet to the store.

Create a new pet in the store

object
category
object
id
integer format: int64
Example
1
name
string
Example
Dogs
id
integer format: int64
Example
10
name
required
string
Example
doggie
photoUrls
required
Array<string>
status

Pet status in the store

string
Allowed values: available pending sold
tags
Array<object>
object
id
integer format: int64
name
string

Successful operation

object
category
object
id
integer format: int64
name
string
id
integer format: int64
name
required
string
photoUrls
required
Array<string>
status

Pet status in the store

string
Allowed values: available pending sold
tags
Array<object>
object
id
integer format: int64
name
string
Example
{
"category": {
"id": 1,
"name": "Dogs"
},
"id": 10,
"name": "doggie",
"status": "available"
}

Invalid input

Validation exception

Unexpected error

Suggest an edit to this page