Booking.com Attachments API

Provides endpoints for handling message attachments. Use these endpoints to upload and download images shared within conversations.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /messages/attachments/upload Upload a file to a message · Upload an attachment #
Ask an LLM
“How do I attach a photo to a message with Booking.com?”
“What file details do I need to upload an attachment?”
Tell an agent
Upload {file_name} ({file_type}, {file_size} bytes) to conversation {conversation} at property {accommodation}.
Attach {file_name} to {conversation} at {accommodation} as a {file_type} file.
POST /messages/attachments/download Download a message attachment · Download a message attachment #
Ask an LLM
“Can I fetch the file a guest attached to a message?”
“What does the downloaded attachment file contain?”
Tell an agent
Download attachment {attachment} from conversation {conversation} at property {accommodation}.
Fetch the attached file {attachment} in {conversation} for {accommodation}.
POST /messages/attachments/metadata Get metadata for a message attachment · Retrieve attachment metadata #
Ask an LLM
“What is the size and type of an attachment I uploaded?”
“Can I check an attachment's name and size without downloading it?”
Tell an agent
Get the metadata for attachment {attachment} in conversation {conversation} at {accommodation}.
Show the file name, type and size of {attachment} in {conversation} for {accommodation}.

Documentation

📖
Documentation
https://developers.booking.com/demand/docs/open-api/3.2/demand-api
📖
GettingStarted
https://developers.booking.com/demand/docs/getting-started/overview
📖
RateLimits
https://artifacts.apis.io/booking-com/rate-limits/booking-com-rate-limits.yml
📖
Documentation
https://developers.booking.com/metasearch/connect-api/open-api
📖
GettingStarted
https://developers.booking.com/metasearch/connect-api/getting-started/overview
📖
Documentation
https://developers.booking.com/connectivity/docs/openapispecs/charges-api/charges-api-specification
📖
Documentation
https://developers.booking.com/connectivity/docs/openapispecs/contracting-api/contracting-api-specificaion
📖
Documentation
https://developers.booking.com/connectivity/docs/openapispecs/facilities-api/facilities-api-specification
📖
Documentation
https://developers.booking.com/connectivity/docs/openapispecs/facilities-api/facilities-openspec-remote-sync
📖
Documentation
https://developers.booking.com/connectivity/docs/openapispecs/payments-api/payments-api-specification
📖
Documentation
https://developers.booking.com/connectivity/docs/openapispecs/payments-by-booking-onboarding-api/pbb-onboarding-api-specification
📖
Documentation
https://developers.booking.com/connectivity/docs/openapispecs/property-details-api/property-details-api-specification
📖
Documentation
https://developers.booking.com/connectivity/docs/openapispecs/reconciliation-api/reconciliation-api-specification
📖
Documentation
https://developers.booking.com/connectivity/docs/openapispecs/rooms-api/rooms-api-specification
📖
Documentation
https://developers.booking.com/connectivity/docs/openapispecs/rooms-api/rooms-api-specification-bulk
📖
Documentation
https://developers.booking.com/connectivity/docs/openapispecs/rooms-api/rooms-api-specification-generated-names
📖
Documentation
https://developers.booking.com/connectivity/docs/openapispecs/valueadds-api/valueadds-api-specification

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/booking-com:booking-com-attachments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

booking-com-attachments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Booking Com Attachments API
  version: '1.0'
  description: 'Operations tagged Attachments across 2 of this provider''s published API definitions: booking-com-demand-api-3-1-openapi.yml, booking-com-demand-api-3-2-beta-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://demandapi.booking.com/3.1
  description: Production environment
- url: https://demandapi-sandbox.booking.com/3.1
  description: Sandbox environment
- url: https://demandapi.booking.com/3.2
  description: Production environment – use for live integrations.
- url: https://demandapi-sandbox.booking.com/3.2
  description: Sandbox environment – use for testing and validation.
security:
- BearerAuth: []
tags:
- name: Attachments
  x-displayName: Attachments
  description: 'Provides endpoints for handling message attachments.


    Use these endpoints to upload and download images shared within conversations.'
paths:
  /messages/attachments/upload:
    post:
      summary: Upload an attachment
      description: 'Uploads a file to be used as a message attachment.

        The response includes an attachment ID to reference when sending messages.'
      operationId: uploadAttachment
      tags:
      - Attachments
      parameters:
      - $ref: '#/components/parameters/AffiliateIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: UploadAttachmentRequest
              type: object
              required:
              - conversation
              - accommodation
              - file_size
              - file_name
              - file_type
              - file_content
              properties:
                conversation:
                  type: string
                  description: Unique identifier of the conversation.
                accommodation:
                  type: string
                  description: Unique identifier of the property.
                file_size:
                  type: integer
                  description: Size of the file in bytes.
                file_name:
                  type: string
                  description: Original file name including extension.
                file_type:
                  type: string
                  description: MIME type of the file.
                file_content:
                  type: string
                  description: Base64-encoded content of the file.
            example:
              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
    servers:
    - url: https://demandapi.booking.com/3.1
      description: Production environment
    - url: https://demandapi-sandbox.booking.com/3.1
      description: Sandbox environment
  /messages/attachments/download:
    post:
      summary: Download a message attachment
      description: Retrieves a file that was attached to a message. The response includes the file's content as a base64-encoded string.
      operationId: downloadMessageAttachment
      tags:
      - Attachments
      parameters:
      - $ref: '#/components/parameters/AffiliateIdHeader'
      requestBody:
        content:
          application/json:
            schema:
              title: DownloadAttachmentRequest
              type: object
              required:
              - conversation
              - accommodation
              - attachment
              properties:
                conversation:
                  type: string
                  description: The unique identifier of the conversation that contains the attachment.
                accommodation:
                  type: string
                  description: The unique identifier of the property where the conversation occurred.
                attachment:
                  type: string
                  description: The unique identifier of the attachment to download.
            example:
              conversation: 8586a789-44f4-5521-9f27-f5efd097cba6
              accommodation: '6819547'
              attachment: 9635be40-1dc6-11f0-8893-0130f0cdef6d
      responses:
        '200':
          description: Attachment successfully retrieved.
          content:
            application/json:
              schema:
                type: object
                properties:
                  request_id:
                    type: string
                    description: A unique ID for this request. Please include this when contacting support.
                  data:
                    type: object
                    properties:
                      conversation:
                        type: string
                        description: The ID of the conversation the file belongs to.
                      file_content:
                        type: string
                        description: The base64-encoded content of the attachment.
              example:
                request_id: 773e2c0d-1ab3-449b-b88a-3d6b5ce09ae7
                data:
                  conversation: 8586a789-44f4-5521-9f27-f5efd097cba6
                  file_content: /9j/4AAQSkZJRgABAQACWAJYAAD/2wCEAAgGBgc...
    servers:
    - url: https://demandapi.booking.com/3.1
      description: Production environment
    - url: https://demandapi-sandbox.booking.com/3.1
      description: Sandbox environment
  /messages/attachments/metadata:
    post:
      summary: Retrieve attachment metadata
      description: Returns metadata for a file uploaded in a message, including its name, type, and size.
      operationId: getAttachmentMetadata
      tags:
      - Attachments
      parameters:
      - $ref: '#/components/parameters/AffiliateIdHeader'
      requestBody:
        content:
          application/json:
            schema:
              title: AttachmentMetadataRequest
              type: object
              required:
              - conversation
              - accommodation
              - attachment
              properties:
                conversation:
                  type: string
                  description: The unique identifier of the conversation that includes the attachment.
                accommodation:
                  type: string
                  description: The unique identifier of the property associated with the conversation.
                attachment:
                  type: string
                  description: The unique identifier of the attachment whose metadata is being requested.
            example:
              conversation: 8586a789-44f4-5521-9f27-f5efd097cba6
              accommodation: '6819547'
              attachment: 9635be40-1dc6-11f0-8893-0130f0cdef6d
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  request_id:
                    description: Uniquely identifies the request. Please provide this identifier when contacting support.
                    type: string
                  data:
                    type: object
                    properties:
                      metadata:
                        type: object
                        properties:
                          file_size:
                            description: The size of the attachment (up to 1MB)
                            type: integer
                          file_name:
                            description: Original name of the file, including extension.
                            type: string
                          file_type:
                            description: MIME type of the file (e.g., image/jpeg).
                            type: string
              example:
                request_id: fec1a9bb-9c85-42fc-a109-3707e1ed4de7
                data:
                  metadata:
                    file_name: 1ce51916-d8de-4144-a4be-265ccae5df9d.jpg
                    file_type: image/jpeg
                    file_size: '92620'
    servers:
    - url: https://demandapi.booking.com/3.1
      description: Production environment
    - url: https://demandapi-sandbox.booking.com/3.1
      description: Sandbox environment
components:
  parameters:
    AffiliateIdHeader:
      in: header
      name: X-Affiliate-Id
      schema:
        type: integer
      required: true
      description: Include here your Affiliate identifier number
  schemas:
    requestId:
      description: Uniquely identifies the request. Please provide this identifier when contacting support.
      type: string
    download_input:
      type: object
      properties:
        conversation:
          type: string
          description: The unique identifier of the conversation
          $ref: '#/components/schemas/conversation'
        accommodation:
          type: string
          description: The unique identifier of the property
          $ref: '#/components/schemas/common_accommodation'
        attachment:
          type: string
          description: The unique identifier of the attachment
          $ref: '#/components/schemas/attachment'
    conversation:
      description: A unique identifier for the conversation thread.
      type: string
    upload_input:
      type: object
      required:
      - conversation
      - accommodation
      - file_size
      - file_name
      - file_type
      - file_content
      properties:
        conversation:
          type: string
          description: The unique identifier of the conversation
          $ref: '#/components/schemas/conversation'
        accommodation:
          type: string
          description: The unique identifier of the property
          $ref: '#/components/schemas/common_accommodation'
        file_size:
          description: The file size in bytes.
          type: integer
          format: int64
          maximum: 1048576
        file_name:
          description: The original file name including extension.
          type: string
        file_type:
          description: 'The MIME type of the attachment (supported formats: PNG, JPEG, JPG).'
          type: string
        file_content:
          description: Base64-encoded content of the attachment.
          type: string
          contentEncoding: base64
    attachment:
      type: string
      description: The unique identifier of the attachment
    upload_output:
      type: object
      properties:
        request_id:
          $ref: '#/components/schemas/requestId'
        data:
          type: object
          properties:
            attachment:
              type: string
              description: The unique identifier of the attachment
              $ref: '#/components/schemas/attachment'
    download_output:
      type: object
      properties:
        request_id:
          $ref: '#/components/schemas/requestId'
        data:
          type: object
          properties:
            conversation:
              type: string
              description: The unique identifier of the conversation
              $ref: '#/components/schemas/conversation'
            file_content:
              type: string
              description: The content of the attachment
              contentEncoding: base64
            attachment:
              type: string
              description: The unique identifier of the attachment
              $ref: '#/components/schemas/attachment'
    common_accommodation:
      type: string
      description: The unique identifier of the property
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: string
x-refined-from:
- booking-com-demand-api-3-1-openapi.yml
- booking-com-demand-api-3-2-beta-openapi.yml
x-tagGroups:
- name: API Endpoints
  tags:
  - Charges endpoint
  - Charges meta endpoint
- name: Documentation
  tags:
  - About Try it