# Add a new pet to the store

`POST /pet`

Operation ID: `addPet`

Tags: `pet`

OpenAPI specification: https://raw.githubusercontent.com/PaloAltoNetworks/docusaurus-openapi-docs/main/demo/examples/petstore.yaml

Add new pet to the store inventory.

## Servers

- `https://petstore.swagger.io/v2`: Default server
- `https://petstore.swagger.io/sandbox`: Sandbox server
- `http://127.0.0.1:4010`: Prism Mock API (local)

## Authentication

Use one of these options:

- `petstore_auth` (OAuth 2.0: implicit (authorization URL http://petstore.swagger.io/api/oauth/dialog), scopes: `write:pets`, `read:pets`)
- `api_key` (API key in header `api_key`)
- `ApiKeyAuth` (API key in header `X-API-Key`)
- `BasicAuth` (HTTP basic)
- `BearerAuth` (HTTP bearer)
- `OAuth2` (OAuth 2.0: authorizationCode (authorization URL https://example.com/oauth/authorize, token URL https://example.com/oauth/token))
- `OpenID` (OpenID Connect (https://example.com/.well-known/openid-configuration))

## 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`

A 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[], required, 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
  - `available`: When the pet is available
  - `pending`: When the pet is being sold
  - `sold`: When the pet has been sold.

    These descriptions can contain line

    breaks and also [links](https://docusaurus.io/)
- `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`: HoneyBee (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, default: `0`, example: `3.14`)
        Average amount of honey produced per day in ounces

Example:

```json
{
  "summary": "A great example!",
  "category": {
    "name": "Great Dane",
    "sub": {
      "prop1": "Just a test property"
    }
  },
  "name": "Pepper",
  "photoUrls": [
    "https://assets.orvis.com/is/image/orvisprd/great-dane"
  ],
  "tags": [
    {
      "name": "Great Danes"
    }
  ],
  "status": "pending",
  "petType": {
    "huntingSkill": "lazy"
  }
}
```

### Content type: `application/xml`

Schema: `object`

- `name` (string)
  hooray

## Responses

### 200

All good, here's some MDX:

:::note

Some content but no markdown is supported :(

:::

:::tip
A TIP with no leading or trailing spaces between delimiters.
:::

:::info

Some **content** with _Markdown_ `syntax`. Check [this `api`](#).

| Month    | Savings |
| -------- | ------- |
| January  | $250    |
| February | $80     |
| March    | $420    |

Hmm.....

:::

:::warning

Some **content** with _Markdown_ `syntax`. Check [this `api`](#) which is not supported :( yet

:::

:::danger

Some plain text

Some more plain text

And more

:::

A **code snippet**!

```python
print("hello")
```

_And_ a table!

| Month    | Savings |
| -------- | ------- |
| January  | $250    |
| February | $80     |
| March    | $420    |

#### Content type: `application/json`

Schema: `object`

- `data` (one of)
  - Exactly one of these options:
    - Option 1 (string)
    - Option 2 (object)

### 405

Invalid input
