Skip to content

Download a message attachment

Request

Retrieves a file that was attached to a message. The response includes the file's content as a base64-encoded string.

Security
BearerAuth
Headers
X-Affiliate-Idintegerrequired

Include here your Affiliate identifier number

Bodyapplication/json
conversationstringrequired

The unique identifier of the conversation that contains the attachment.

accommodationstringrequired

The unique identifier of the property where the conversation occurred.

attachmentstringrequired

The unique identifier of the attachment to download.

curl -i -X POST \
  https://demandapi.booking.com/3.1/messages/attachments/download \
  -H 'Authorization: Bearer <YOUR_string_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'X-Affiliate-Id: 0' \
  -d '{
    "conversation": "8586a789-44f4-5521-9f27-f5efd097cba6",
    "accommodation": "6819547",
    "attachment": "9635be40-1dc6-11f0-8893-0130f0cdef6d"
  }'

Responses

Attachment successfully retrieved.

Bodyapplication/json
request_idstring

A unique ID for this request. Please include this when contacting support.

dataobject
Response
{ "request_id": "773e2c0d-1ab3-449b-b88a-3d6b5ce09ae7", "data": { "conversation": "8586a789-44f4-5521-9f27-f5efd097cba6", "file_content": "/9j/4AAQSkZJRgABAQACWAJYAAD/2wCEAAgGBgc..." } }