Upload an image
Upload an image for a pet.
POST https://petstore3.swagger.io/api/v3/pet/{petId}/uploadImage
Examples
- API Key
- OAuth 2.0
cURL
POST "https://petstore3.swagger.io/api/v3/pet/210/uploadImage" \
-H "accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "api_key: <YOUR_API_KEY>" \
--form "file=@/path/to/your/file"
cURL
POST "https://petstore3.swagger.io/api/v3/pet/210/uploadImage" \
-H "accept: application/json" \
-H "Content-Type: multipart/form-data" \
-H "Authorization: Bearer <YOUR_OAUTH_TOKEN>" \
--form "file=@/path/to/your/file"
Responses
| Code | Description |
|---|---|
| 200 | Successful operation |
| default | Unexpected error |
Response example
200: Successful operation
Response
{
"code": 200,
"type": "unknown",
"message": "additional data"
}
Parameters
Path parameters
| Name | Type | Description |
|---|---|---|
petId | integer | ID of pet to update |
Form data parameters
| Name | Type | Description |
|---|---|---|
additionalMetadata | string | Extra data to pass to server. |
file | file | File to upload. |