AI Assistant

How can I help you today?

PetsCreate Pets Petid Upload Image
Pets

POST /pets/{petId}/upload-image

Upload an image for a specific pet

curl -X POST "https://api.petstore.example.com/v1/pets/123/upload-image" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "message": "Image uploaded successfully",
  "imageUrl": "https://images.petstore.example.com/pets/123/main.jpg"
}
POST
/pets/{petId}/upload-image
POST
Security Scheme
Bearer Tokenstring
Required

JWT token obtained from the login endpoint

JWT token obtained from the login endpoint
path
petIdinteger
Required

ID of the pet

Format: int64
Content-Typestring
Required

The media type of the request body

Options: multipart/form-data
imagestring

Pet image file (JPEG, PNG, GIF)

Format: binary
descriptionstring

Optional image description

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). JWT token obtained from the login endpoint

Path Parameters

Body

multipart/form-data
imagefile

Pet image file (JPEG, PNG, GIF)

descriptionstring

Optional image description

Responses

messagestring
imageUrlstring