Files go straight from your system to storage, in three steps. You need an API key with the properties.MANAGE permission.

1. Get an upload URL

Call Get a file upload URL once for each file:

{ "fileType": "image/jpeg", "extension": "jpg" }

The response includes an uploadUrl, a fileUrl and an id for the file. The upload URL works for 5 minutes.

2. Upload the file

Send the file to uploadUrl with a PUT request. Use the same content type as in step 1, and don’t send your API key to this URL.

curl --request PUT \
  --url 'UPLOAD_URL_FROM_STEP_1' \
  --header 'Content-Type: image/jpeg' \
  --upload-file ./living-room.jpg

3. Attach it to the property

For photos, add each fileUrl to photos or floorPlansPhotos when you create or update the property.

For documents, call Confirm uploaded documents with the folder and file details.