# Create a pet

**POST** `/pets`

Base URL: `https://petstore.swagger.io/v2`

Create a pet

## Authorization

- X-API-Key (apiKey in header)

## Body

Content type: `application/json`

- `name` (string, required)
- `tag` (string)

Example:

```json
{
  "name": "Rex",
  "tag": "dog"
}
```

## Responses

### 201

Created

- `name` (string, required)
- `tag` (string)
- `id` (string)

Example:

```json
{
  "name": "Rex",
  "tag": "dog",
  "id": "abc123"
}
```