Rooms: UpdatePicture

Updates the photo for a room.

Supported file types

The API supports the following file types:

  • jpg/jpeg
  • png
  • tiff
  • gif

File size limit

The file size limit is approximately 40 MB.

Supported content types

This endpoint supports the following content types:

JSON

To submit a picture by using JSON, set the Content-Type header to application/json and provide a pictureForUpdate object.

You can also set the Content-Transfer-Encoding header to base64 to indicate that the image is formatted as base64 instead of binary.

Example:

Header: Content-Type: application/json

Request body content to include:

"pictureForUpdate":
  {
    "fileName":"string", 
    "base64Contents":"string"
  }

Multipart form data

You can also submit multipart form data with parts that contain the image. Multipart uploads remove the need to encode images in base64 format.

For details, see Multipart Form Requests.

Other streamed binary content type

You can also use any other streamed binary content type, but you must include either the query parameter fileName or the Content-Disposition filename request header.

Example:

Header: Content-Disposition: file; filename="123sesamest.jpg"

Request

HTTP request

PUT /restapi/v2/accounts/{accountId}/rooms/{roomId}/picture

Parameters

Parameter NameValueDescription
Path Parameters
roomIdinteger

(Required) The id of the room for which you are updating the picture.

accountIdstring

(Required) The globally-unique identifier (GUID) for the account.

Responses

CodeDescriptionReference
200

Picture successfully updated.

RoomPicture
400

Bad request. See ErrorCode and Message for details

ApiError
401

Not authorized to make this request.

ApiError

SDK Method

Rooms::UpdatePicture

Definitions

ApiError

This object describes errors that occur. It is valid only for responses and ignored in requests.

errorCodestring

The code associated with the error condition.

messagestring

A brief message describing the error condition.

RoomPicture

This response object contains the URL for the uploaded picture.

urlstring

The URL for the uploaded picture.

}} />