Skip to main content

uploads an image

POST 

https://petstore3.swagger.io/api/v3/pet/:petId/uploadImage

Request

Path Parameters

    petId int64required

    ID of pet to update

Query Parameters

    additionalMetadata string

    Additional Metadata

Body

    stringbinary

Responses

successful operation

Schema
    codeint32
    typestring
    messagestring

Authorization: oauth2

name: petstore_authtype: oauth2scopes: write:pets,read:petsflows: {
  "implicit": {
    "authorizationUrl": "https://petstore3.swagger.io/oauth/authorize",
    "scopes": {
      "write:pets": "modify pets in your account",
      "read:pets": "read your pets"
    }
  }
}
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://petstore3.swagger.io/api/v3/pet/:petId/uploadImage");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent(string.Empty);
content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://petstore3.swagger.io/api/v3
Auth
Parameters
— pathrequired
— query
Body
Body
ResponseClear

Click the Send API Request button above and see the response here!