# Add a new pet to the store.

Add a new pet to the store.

[Add a new pet to the store.](https://clay-doc.github.io/clay-example-repo/de/api/petstore/pet/add-pet.md)

```sh
curl -X POST 'https://petstore3.swagger.io/api/v3/pet' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "status": "available"
}'
```
## Authentifizierung

::: fields
- `petstore_auth` *write:pets* *read:pets*

  [OAuth 2.0](https://clay-doc.github.io/clay-example-repo/de/api/petstore.md#authentifizierung)
:::

## Anfrage-Body :badge[erforderlich]{caution}

Create a new pet in the store

:badge[application/json]{note} :badge[application/xml]{note} :badge[application/x-www-form-urlencoded]{note} · Typ: [Pet](https://clay-doc.github.io/clay-example-repo/de/api/petstore/schemas/pet.md)

::: fields
- `id` integer (int64)
- `name` string **erforderlich**
- `category` [Category](https://clay-doc.github.io/clay-example-repo/de/api/petstore/schemas/category.md)
- `photoUrls` array of string **erforderlich**
- `tags` array of [Tag](https://clay-doc.github.io/clay-example-repo/de/api/petstore/schemas/tag.md)
- `status` string

  pet status in the store

  Erlaubte Werte: `"available"`, `"pending"`, `"sold"`
:::

::: code-group
```json [application/json]
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "status": "available"
}
```
```xml [application/xml]
<pet>
  <id>10</id>
  <name>doggie</name>
  <category>
    <id>1</id>
    <name>Dogs</name>
  </category>
  <photoUrls>
    <photoUrl>string</photoUrl>
  </photoUrls>
  <tags>
    <tag>
      <id>0</id>
      <name>string</name>
    </tag>
  </tags>
  <status>available</status>
</pet>
```
:::

## Antworten

::: tabs status
== 200

Successful operation

:badge[application/json]{note} :badge[application/xml]{note} · Typ: [Pet](https://clay-doc.github.io/clay-example-repo/de/api/petstore/schemas/pet.md)

::: fields
- `id` integer (int64)
- `name` string **erforderlich**
- `category` [Category](https://clay-doc.github.io/clay-example-repo/de/api/petstore/schemas/category.md)
- `photoUrls` array of string **erforderlich**
- `tags` array of [Tag](https://clay-doc.github.io/clay-example-repo/de/api/petstore/schemas/tag.md)
- `status` string

  pet status in the store

  Erlaubte Werte: `"available"`, `"pending"`, `"sold"`
:::

::: code-group
```json [application/json]
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "status": "available"
}
```
```xml [application/xml]
<pet>
  <id>10</id>
  <name>doggie</name>
  <category>
    <id>1</id>
    <name>Dogs</name>
  </category>
  <photoUrls>
    <photoUrl>string</photoUrl>
  </photoUrls>
  <tags>
    <tag>
      <id>0</id>
      <name>string</name>
    </tag>
  </tags>
  <status>available</status>
</pet>
```
:::

== 400

Invalid input

== 422

Validation exception

== default

Unexpected error
:::

---

All pages of these docs, as Markdown for language models: https://clay-doc.github.io/clay-example-repo/de/llms.txt
