Last updated

Messaging API collection – Migrating to v3.2 Beta 3.2 Beta

Comprehensive guide for integrating Messaging flows from Demand API v3.1 to v3.2 Beta


Introduction

This guide details the changes between v3.1 and v3.2 Beta of the Messaging API collection. It explains what your integration must update to remain compatible, including request validation, response parsing, and new fields.

Use this guide to update your integration to the latest schema, ensure field compatibility, and prevent data parsing issues.

Who this guide is for

Developers and integration partners participating in the early access pilot who integrate the v3.2 Beta endpoints:

  • /messages/send
  • /messages/latest
  • /messages/latest/confirm
  • /messages/conversations
  • /messages/attachments/upload
  • /messages/attachments/download
  • /messages/attachments/metadata

Messaging API – Breaking changes in v3.2 Beta

Messaging API v3.2-Beta introduces non-backward-compatible changes in request and response structures. Your integration must be updated to prevent request failures or parsing errors.

Critical breaking changes

Breaking changes 3.2 Beta

EndpointChange / FieldImpact / Action Required
/messages/conversationsResponse: data.conversationsdata.conversationParsing logic must be updated to read the singular conversation object.
Request: accommodation + one of conversation or reservation now requiredRequests missing these fields will be rejected. Implement oneOf logic.
messages[].reply_to removedAny code relying on message threading via reply_to must use conversation.id instead.
messages[].sender now a string ID referencing participants[].idUpdate parsing to map sender from participants array.
/messages/latest/confirmResponse: confirmedMessages addedOptional: parse and store confirmed message IDs if needed for acknowledgement tracking.

Breaking changes 3.2 Beta Breaking changes

The following changes in Demand API v3.2 may require modifications to your integration. These are not backward-compatible and should be prioritised during migration.

EndpointChange / FieldImpact / Action Required
/messages/conversationsResponse: data.conversationsdata.conversationParsing logic must be updated to read the singular conversation object.
Request: accommodation + one of conversation or reservation now requiredRequests missing these fields will be rejected. Implement oneOf logic.
messages[].reply_to removedAny code relying on message threading via reply_to must use conversation.id instead.
messages[].sender now a string ID referencing participants[].idUpdate parsing to map sender from participants array.
/messages/latest/confirmResponse: confirmedMessages addedOptional: parse and store confirmed message IDs if needed for acknowledgement tracking.

Overall Messaging API migration matrix

Endpointv3.1 → v3.2 / Key changes / Migration notes
/messages/conversations
  • Response changed from data.conversations (list) → data.conversation (single).
  • Messages now include attachments;
  • Request: conversation or reservation is required (oneOf).
  • Participants metadata (type, name) unchanged.
/messages/latestmessage field renamed to id.
  • sender.metadata structure clarified (type and name).
  • Other fields largely unchanged.
/messages/latest/confirmAdded confirmedMessages array in response.
/messages/sendNo changes. Fully backward-compatible.
/messages/attachments/downloadNew attachment field returned in response.
/messages/attachments/metadataNo changes. Fully backward-compatible.
/messages/attachments/uploadNo changes. Fully backward-compatible.

Integration Tips

  • Update your response parsing for /conversations and /latest to handle new attachments and renamed fields.
  • Implement oneOf logic for /conversations request: either conversation or reservation is required.
  • Optional: Use confirmedMessages from /latest/confirm for reliable acknowledgment tracking.
  • Existing /send and /attachments workflows are safe to continue without changes.

See changes in detail:

/messages/conversations

Overview of key improvements

Areav3.1v3.2Migration impact
TagMessagesConversationsUpdate references if you categorise endpoints by tag.
Top-level structureLoosely definedStrict schema with required fieldsUpdate JSON validation logic.
Conversation modelMixed plural/singular naming (conversations)Singular and consistent (conversation)Rename in parsing logic.
Message modelInconsistent field names (message vs id)Unified and validatedUpdate field mapping.
Participants structureIncorrect nestingFixed array of objects with id and metadataUpdate participant parsing.
Redundant fieldsreply_toRemovedRemove unused mappings.

Request changes

Changev3.1v3.2Action
Request body requiredAll fields optional (accommodation, conversation, reservation).accommodation is required.Always send JSON body.
Required fieldsNoneaccommodation + one of (conversation or reservation)Adjust request builder logic.
Validation logicNo enforcement✅ Uses oneOfEnsure your client sends only one identifier type per request.

Example request (v3.2)

Retrieve conversation by conversation ID:

{
  "accommodation": "6819547",
  "conversation": "c3cc6522-aa63-559d-99f1-94efdd527c3c"
}

Response structure overview

{
  "request_id": "...",
  "data": {
    "conversations": {
      "messages": [...],
      "id": "c3cc...",
      "reservation": "4338...",
      "participants": [...]
    }
  }
}

✅ Action: Rename the object from data.conversationsdata.conversation.

Field-level comparison

Path (v3.1)Path (v3.2)Change typeNotes / Action
data.conversationsdata.conversation✅ RenameSingular naming for consistency.
conversation (ID string inside data.conversations)conversation.id✅ Rename and moveID now lives within the conversation object.
messages[].messagemessages[].id✅ RenameUpdate ID key for each message.
messages[].reply_to❌ RemovedDeprecatedNo replacement — remove dependency.
messages[].contentmessages[].contentNo changeStill plain text message body.
messages[].sendermessages[].senderSame meaning, cleaner descriptionNo structural change.
messages[].timestampmessages[].timestampSame ISO-8601 formatNo change, still required.
participants[].participantparticipants[].id✅ RenameStandardised naming.
participants[].metadata.typeparticipants[].metadata.typeSame values (guest, property)Enum unchanged.
participants[].metadata.nameparticipants[].metadata.nameClarified descriptionRepresents participant name or property ID.
data.request_idrequest_id (top level)✅ Flattened consistencyStill top-level, no rename needed.

Message object: Before → after

Fieldv3.1v3.2Action
messageUnique message IDidRename field in mapping.
senderSender ID✅ No change
reply_toReply message ID❌ RemovedDrop from schema.
contentMessage text✅ No change
timestampISO-8601 format✅ No change

Participants object: Before → after

Fieldv3.1v3.2Action
participantParticipant IDidRename.
metadata.typeguest or property✅ SameNo change.
metadata.nameIdentifier string✅ Same, clarifiedUsually the property ID.
metadata nestingIncorrect (properties instead of items)✅ Fixed array structureAdjust parsing for arrays.

Integration checklist

TaskDescriptionStatus
Rename data.conversationsdata.conversation
Update messageid
Remove reply_to
Update participant parsing (participantid)
Add attachment support (attachments[])
Validate that request includes accommodation and only one of conversation/reservation
Adjust unit tests and mock data to v3.2 examples
Update documentation / SDK mappings

/messages/latest/

Message object changes

Fieldv3.1v3.2Action required
reply_to✅ Present (referencing previous message)❌ RemovedIf your integration relies on message threading via reply_to, you’ll need to adapt to use only conversation.id for linking messages.
conversationid, accommodation, reservationSameNo change.
contentMessage bodySameNo change.
idMessage unique IDSameNo change, but renamed in example from messageid.
sender.participantParticipant unique IDSameNo change.
sender.metadata$ref: '#/metadata' (unspecified)Explicit object with type and nameYou must now explicitly parse sender.metadata.type (either guest or property) and sender.metadata.name (display name).
attachments[]Array of attachment IDsSameNo change.
timestampISO-8601 timestampSameNo change.

Example comparison:

{
  "request_id": "0248d85a-17e0-44b3-a37c-7d4b5c03f58b",
  "data": {
    "messages": [
      {
        "reply_to": "daca26da-4ce3-519d-b9eb-623eeb674800",
        "conversation": {
          "id": "b2364f9b-6466-599a-a947-0d35cff4f492",
          "reservation": "4439608993",
          "accommodation": "5589515"
        },
        "content": "Hello Pega, welcome...",
        "message": "52100000-2be9-11f0-bced-bdc849c480b6",
        "sender": {
          "participant": "930d9af8-2390-5e43-a4d7-235b52a30a14",
          "metadata": {
            "type": "property",
            "name": "CS Training Test Hotel Sloterdijk 10"
          }
        },
        "attachments": [],
        "timestamp": "2025-05-08T08:49:15.000Z"
      }
    ]
  }
}

Summary of migration actions

ChangeRequired action
reply_to removedRemove this field from message parsing and storage logic.
sender.metadata now explicitly typedUpdate your data model to handle type and name fields.
messageid in exampleEnsure you reference id instead of message.
Other fieldsNo change — existing parsing logic should continue to work.

/messages/latest/confirm

Categoryv3.1v3.2Migration notes
PurposeConfirm receipt of messages to continue receiving new messages from /messages/latest.SameNo change in usage.
Request bodymessages[] (array of message IDs)SameNo change — request remains identical.
Response{ request_id }{ request_id, confirmedMessages[] }New array confirmedMessages added to explicitly list confirmed message IDs.

There are no changes in request.

Response structure changes

{
  "request_id": "cdb0b154-2eae-481b-8fee-fb2725296e1f"
}

Migration actions

ChangeAction required
confirmedMessages addedUpdate parsing logic to include and optionally store confirmedMessages to confirm which messages were acknowledged.
Response request_idNo change, continue using as before.
Request bodyNo action needed. Existing requests remain compatible.

/messages/attachments endpoints

These endpoints:

  • /messages/attachments/download
  • /messages/attachments/metadata
  • /messages/attachments/upload

Overview

Endpointv3.1v3.2Migration notes
/downloadReturns request_id and data.file_contentReturns request_id, data.file_content, and now includes data.attachmentNew attachment field explicitly returns the attachment ID. Update parsing if you need it.
/metadataReturns request_id and data.metadata with file_name, file_size, file_typeSameNo change. Fully backward-compatible.
/uploadAccepts conversation, accommodation, file_size, file_name, file_type, file_content and returns request_id + data.attachmentSameNo change. Fully backward-compatible.

Example - /messages/attachments/download response

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

✅ Migration action: Add parsing for data.attachment if needed; no breaking changes.

Summary

  • /attachments/download → new attachment field in response (optional, non-breaking).
  • /attachments/metadata and /attachments/upload → no changes; fully backward-compatible.

All existing integrations will continue working in v3.2 without modification.


Endpoint details

/messages/conversations

Key structural improvements

  • Read sender as string ID.

  • Map messageid, and reply_to/conversationid.

  • Retrieve sender metadata from participants if needed.

  • Previously participant (or nested id) → now participants[].id.

  1. Handle /messages/latest/confirm response:

Example - v3.2 Beta request

  1. Tests & validation
  • Validate request body against stricter required fields.
  • Use sandbox hotel and environment for testing.

Quick migration checklist

Use this checklist to ensure your Messaging API integration is fully compatible with v3.2-Beta.

Checklist
Update all /messages/conversations requests to include the accommodation field (now required).
Ensure requests contain either conversation or reservation — one is now mandatory.
Replace response parsing for messages[].sender - it is now a string ID referencing participants[].id instead of an object.
Update your message model: id replaces the older message field.
Use the new id field instead of reply_to or conversation.
Update participant structure: participantid, and include optional metadata (type, name).
Handle the new optional array confirmedMessages in /messages/latest/confirm responses.
Validate requests and responses against new required fields and stricter schema rules.
If you handle attachments, note minor schema refinements (e.g., contentEncoding: base64).

Need help?

If you have questions about your Messaging integration migration, contact your Booking.com technical account manager.

By following these guidelines and making the required updates, you can smoothly transition to Demand API v3.2 and continue to provide a seamless Messaging experience for your travellers.


What´s next