POST restapi/personal/person/image/v1

Upload and update a person's profile image.

The maximum dimensions of the persons image can be retrieved using the resource URL [personal/person/image/dimensions]. If the image is bigger in size, then it will automatically be scaled to the correct size.

The image can be sent using the HTTP Content-Type set for the image. For example, for JPEG images set content type to 'image/jpeg' or for PNG images set content type to 'image/png'. Alternatively, the image can be uploaded as a multi-part content, using the content type 'multipart/form-data'.

Request Information

URI Parameters

None.

Body Parameters

None.

Response Information

Resource Description

Returns HTTP status 201 if the image has been successfully created. The response will contain the Location header which has the absolute URI of the uploaded image. If request is not successful there will be an error in the response.

Exceptions thrown:

InvalidContentException (HTTP error code 415 when incorrect file type is uploaded which is not an image or if an attempt is made to upload multiple files.)

Returns 403 if the user don't have access to change the profile picture. The user needs access to Personal Settings in order to add or change the profile picture. This can be turned on or of in the users profile.

System.Net.Http.HttpResponseMessage
NameDescriptionTypeAdditional information
Version

System.Version

None.

Content

System.Net.Http.HttpContent

None.

StatusCode

System.Net.HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

System.Net.Http.HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.