Skip to main content
POST
/
pet
Add a new pet to the store.
curl --request POST \
  --url https://petstore3.swagger.io/api/v3/pet \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "doggie",
  "photoUrls": [
    "<string>"
  ],
  "id": 10,
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "tags": [
    {
      "id": 123,
      "name": "<string>"
    }
  ],
  "status": "available"
}
'
{
  "name": "doggie",
  "photoUrls": [
    "<string>"
  ],
  "id": 10,
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "tags": [
    {
      "id": 123,
      "name": "<string>"
    }
  ],
  "status": "available"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

Create a new pet in the store

name
string
required
Example:

"doggie"

photoUrls
string[]
required
id
integer<int64>
Example:

10

category
object
tags
object[]
status
enum<string>

pet status in the store

Available options:
available,
pending,
sold

Response

Successful operation

name
string
required
Example:

"doggie"

photoUrls
string[]
required
id
integer<int64>
Example:

10

category
object
tags
object[]
status
enum<string>

pet status in the store

Available options:
available,
pending,
sold