---
title: "Update an existing pet"
method: PUT
path: "/pet"
tags: ["pet"]
---

# Update an existing pet

`PUT /pet`

## Request

- Base URL: `/v3` (relative, and the document’s source URL is not known)
- URL: `/v3/pet`
- Auth: OAuth 2
  - Implicit: `https://petstore.swagger.io/oauth/authorize`
  - Scopes: `write:pets`, `read:pets`

Update an existing pet by Id

## Request body

- Pet
  - `id` integer
  - `name` string, required
  - `category` Category
    - `id` integer
    - `name` string
  - `photoUrls` string[], required
  - `tags` Tag[]
    - `id` integer
    - `name` string
  - `status` 'available' | 'pending' | 'sold': pet status in the store

## Response `200`

Successful operation

- Pet
  - `id` integer
  - `name` string, required
  - `category` Category
    - `id` integer
    - `name` string
  - `photoUrls` string[], required
  - `tags` Tag[]
    - `id` integer
    - `name` string
  - `status` 'available' | 'pending' | 'sold': pet status in the store

## Other responses

- `400`: Invalid ID supplied
- `404`: Pet not found
- `405`: Validation exception

---

[API](https://skmtc.dev/lightcast/apis/swagger-petstore-openapi-3-0.md) - [All operations](https://skmtc.dev/lightcast/apis/swagger-petstore-openapi-3-0/llms.txt) - [OpenAPI document](https://skmtc.dev/lightcast/apis/swagger-petstore-openapi-3-0/revisions/4f1f6cb5a0cb?raw)
