Add a new pet to the store
POST/v3/pet
Add a new pet to the store
Request
- application/json
- application/xml
- application/x-www-form-urlencoded
Body
required
Create a new pet in the store
id int64
name stringrequired
category category
photoUrls string[]required
tags tag[]
status string
Possible values: [available
, pending
, sold
]
pet status in the store
Body
required
Create a new pet in the store
id int64
name stringrequired
category category
photoUrls string[]required
tags tag[]
status string
Possible values: [available
, pending
, sold
]
pet status in the store
Body
required
Create a new pet in the store
id int64
name stringrequired
category category
photoUrls string[]required
tags tag[]
status string
Possible values: [available
, pending
, sold
]
pet status in the store
Responses
- 200
- 405
Successful operation
- application/xml
- application/json
- Schema
- Example (from schema)
Schema
id int64
name stringrequired
category category
photoUrls string[]required
tags tag[]
status string
Possible values: [available
, pending
, sold
]
pet status in the store
<root>
<id>10</id>
<name>doggie</name>
<category>
<id>1</id>
<name>Dogs</name>
</category>
<photoUrls>string</photoUrls>
<tags>
<id>0</id>
<name>string</name>
</tags>
<status>available</status>
</root>
- Schema
- Example (from schema)
Schema
id int64
name stringrequired
category category
photoUrls string[]required
tags tag[]
status string
Possible values: [available
, pending
, sold
]
pet status in the store
{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}
Invalid input
Authorization: oauth2
name: petstore_authtype: oauth2scopes:write:pets,read:pets
flows: { "implicit": { "authorizationUrl": "https://petstore.swagger.io/oauth/authorize", "scopes": { "write:pets": "modify pets in your account", "read:pets": "read your pets" } } }
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST '/v3/pet' \
-H 'Content-Type: application/json' \
-H 'Accept: application/xml' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}'
ResponseClear