API REFERENCES/Version 3.1//
- Upload an attachment
Download a message attachment
Retrieve attachment metadata
Upload an attachment
Uploads a file to be used as a message attachment. The response includes an attachment ID to reference when sending messages.
Security
BearerAuth
- Production environmenthttps://demandapi.booking.com/3.1/messages/attachments/upload
- Sandbox environmenthttps://demandapi-sandbox.booking.com/3.1/messages/attachments/upload
curl -i -X POST \
https://demandapi.booking.com/3.1/messages/attachments/upload \
-H 'Authorization: Bearer <YOUR_string_HERE>' \
-H 'Content-Type: application/json' \
-H 'X-Affiliate-Id: 0' \
-d '{
"accommodation": "6819547",
"conversation": "8586a789-44f4-5521-9f27-f5efd097cba6",
"file_size": 17580,
"file_name": "a3e062a0-3e6b-4592-9df2-64cf83688084.jpg",
"file_type": "image/jpeg",
"file_content": "/9j/4AAQSkZJRgABAQACWAJYAAD/2wCEAAgGBgc"
}'