Use this endpoint to upload a file to be used as a message attachment. The response includes an attachment ID to reference when sending messages.
Security
BearerAuth
- https://demandapi.booking.com/3.2https://demandapi.booking.com/3.2/messages/attachments/upload
- https://demandapi-sandbox.booking.com/3.2https://demandapi-sandbox.booking.com/3.2/messages/attachments/upload
curl -i -X POST \
https://demandapi.booking.com/3.2/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"
}'Response
{ "request_id": "c249e7b6-be70-411b-bcb7-0c2d49313199", "data": { "attachment": "695b7f90-2c08-11f0-9cee-134ca9b067d1" } }