Skip to main content

Add a new pet to the store

POST 

/v3/pet

Add a new pet to the store

Request

Body

required

Create a new pet in the store

    id int64
    name stringrequired
    category category
    id int64
    name string
    photoUrls string[]required
    tags tag[]
  • Array [
  • id int64
    name string
  • ]
  • status string

    Possible values: [available, pending, sold]

    pet status in the store

Responses

Successful operation

Schema
    id int64
    name stringrequired
    category category
    id int64
    name string
    photoUrls string[]required
    tags tag[]
  • Array [
  • id int64
    name string
  • ]
  • status string

    Possible values: [available, pending, sold]

    pet status in the store

Authorization: oauth2

name: petstore_authtype: oauth2scopes: write:pets,read:petsflows: {
  "implicit": {
    "authorizationUrl": "https://petstore.swagger.io/oauth/authorize",
    "scopes": {
      "write:pets": "modify pets in your account",
      "read:pets": "read your pets"
    }
  }
}
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"
}'
Request Collapse all
Base URL
/v3
Auth
Body required
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "status": "available"
}
ResponseClear

Click the Send API Request button above and see the response here!