Add Pet

Add Pet

Add a new pet to the store.

Request
URI
POST
https://petstore3.swagger.io/pet
COPY
Request Body

Create a new pet in the store

Pet of type(s) application/json
Required

Show optional properties

{
    "name": "doggie",
    "photoUrls": [
        {}
    ]
}
{
    "id": 10,
    "name": "doggie",
    "category": {
        "id": 1,
        "name": "Dogs"
    },
    "photoUrls": [
        "string"
    ],
    "tags": [
        {
            "0": "P",
            "1": "e",
            "2": "t",
            "3": " ",
            "4": "O",
            "5": "b",
            "6": "j",
            "7": "e",
            "8": "c",
            "9": "t",
            "id": 0,
            "name": "string"
        }
    ],
    "status": "string"
}
integer As int64 As int64
id
Optional

id

string
name
Required

name

object
category
Optional

category

array of string
photoUrls
Required

photoUrls

array of object
tags
Optional

tags

string
status
Optional

pet status in the store

Possible values are : available, pending, sold,
Authentication
This operation uses the following authentication methods.
Responses
200

Successful operation

Returns Pet of type(s) application/json
"Pet Object"
integer As int64 As int64
id
Optional

id

string
name
Required

name

object
category
Optional

category

array of string
photoUrls
Required

photoUrls

array of object
tags
Optional

tags

string
status
Optional

pet status in the store

Possible values are : available, pending, sold,

400

Invalid input

Operation doesn't return any data structure

422

Validation exception

Operation doesn't return any data structure

default

Unexpected error

Returns Error of type(s) application/json
"Error Object"
string
code
Required

code

string
message
Required

message


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"name:"string","photoUrls":["string"]}' https://{api_host}/pet