# Add a new pet to the store

`POST /pet`

Operation ID: `addPet`

Tags: `pet`

OpenAPI specification: https://redocly.com/_spec/docs/openapi/petstore.json

Add new pet to the store inventory.

## Servers

- `https://petstore.swagger.io/v2`: Default server
- `https://petstore.swagger.io/sandbox`: Sandbox server

## Authentication

This operation requires:

- `petstore_auth` (OAuth 2.0: implicit (authorization URL http://petstore.swagger.io/api/oauth/dialog), scopes: `write:pets`, `read:pets`)

## Parameters

### Header parameters

- `Accept-Language` (string, default: `en-AU`, example: `en-US`)
  The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US

### Cookie parameters

- `cookieParam` (integer<int64>, required)
  Some cookie

## Request body (required)

Pet object that needs to be added to the store

### Content type: `application/json`

Schema: `Pet`

My Pet

- `id` (integer<int64>, read-only)
  Pet ID
  More information: Find more info here https://example.com
- `category` (Category)
  Categories this pet belongs to
  - `category.id` (integer<int64>, read-only)
    Category ID
  - `category.name` (string, non-empty)
    Category name
  - `category.sub` (object)
    Test Sub Category
    - `category.sub.prop1` (string)
      Dumb Property
- `name` (string, required, example: `Guru`)
  The name given to a pet
- `photoUrls` (string<url>[], required, max items: 20)
  The list of URL to a cute photos featuring pet
- `friend` (circular reference to Pet)
- `tags` (Tag[], min items: 1)
  Tags attached to the pet
  - `tags[].id` (integer<int64>, read-only)
    Tag ID
  - `tags[].name` (string, non-empty)
    Tag name
- `status` (string, possible values: `available`, `pending`, `sold`)
  Pet status in the store
- `petType` (string, discriminator)
  Type of a pet
  - The value selects one of these schemas:
    - `cat`: cat (object)
      A representation of a cat
      Also includes all fields of Pet (circular reference, not repeated here).
      - `huntingSkill` (string, required, possible values: `clueless`, `lazy`, `adventurous`, `aggressive`, default: `lazy`, example: `adventurous`)
        The measured skill for hunting
    - `dog`: dog (object)
      A representation of a dog
      Also includes all fields of Pet (circular reference, not repeated here).
      - `packSize` (integer<int32>, required, >= 1, default: `1`)
        The size of the pack the dog is from
    - `bee`: bee (object)
      A representation of a honey bee
      Also includes all fields of Pet (circular reference, not repeated here).
      - `honeyPerDay` (number, required, multiple of 0.01, example: `3.14`)
        Average amount of honey produced per day in ounces

### Content type: `application/xml`

Schema: `object`

- `name` (string)
  hooray

## Responses

### 405

Invalid input
