TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

PUT api/2.0/people/{userid}/photo This function requires authentication

Description

Updates a photo of the user with the ID specified in the request.

Parameters
Name Description Type Example
userid
sent in url
User ID string some text
files
sent in body
New avatar photo URL string some text
Example
PUT api/2.0/people/%22some+text%22/photo
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "files": "some text"
}
Returns

Updated user photo

Example Response

application/json

{
  "status": 0,
  "response": {
    "Original": "default_user_photo_size_1280-1280.png",
    "Retina": "default_user_photo_size_360-360.png",
    "Max": "default_user_photo_size_200-200.png",
    "Big": "default_user_photo_size_82-82.png",
    "Medium": "\"default_user_photo_size_48-48.png",
    "Small": "default_user_photo_size_32-32.png"
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <Original>default_user_photo_size_1280-1280.png</Original>
    <Retina>default_user_photo_size_360-360.png</Retina>
    <Max>default_user_photo_size_200-200.png</Max>
    <Big>default_user_photo_size_82-82.png</Big>
    <Medium>"default_user_photo_size_48-48.png</Medium>
    <Small>default_user_photo_size_32-32.png</Small>
  </response>
</result>