---
title: "Uploads an image."
method: POST
path: "/pet/{petId}/uploadImage"
tags: ["pet"]
---

# Uploads an image.

`POST /pet/{petId}/uploadImage`

Upload image of the pet.

## Path parameters

- `petId` integer, required

## Query parameters

- `additionalMetadata` string

## Response `200`

successful operation

- ApiResponse
  - `code` integer
  - `type` string
  - `message` string

## Other responses

- `400` — No file uploaded
- `404` — Pet not found
- `default` — Unexpected error

## Changes

- **2025-03-19** `1315ee0b6b7e` — 2 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `404`
- **2025-03-17** `d5fd36e3763a` — 2 info
  - removed the non-success response with the status `400`
  - removed the non-success response with the status `404`
- **2025-03-14** `78de4368a03c` — 2 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `404`
- **2025-03-13** `887ffd0911f2` — 2 info
  - removed the non-success response with the status `400`
  - removed the non-success response with the status `404`
- **2025-03-12** `253de9e0f0ae` — 1 breaking, 1 warning, 2 info
  - the `code` response's property type/format changed from `integer`/`int32` to `string`/`` for status `default`
  - removed the optional property `type` from the response with the `default` status
  - the response property `code` became required for the status `default`
  - the response property `message` became required for the status `default`

[Full history](https://skmtc.dev/swagger/apis/swagger-petstore-openapi-3-0/changes/pet/:petId/uploadImage/post.md)

---

[API](https://skmtc.dev/swagger/apis/swagger-petstore-openapi-3-0.md) · [All operations](https://skmtc.dev/swagger/apis/swagger-petstore-openapi-3-0/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/swagger/swagger-petstore-openapi-3-0/revisions/e1a2480ffa44/schema)
