Skip to content
Last updated

Messaging troubleshooting

Find solutions to common issues when retrieving conversations, sending messages, confirming receipt and managing attachments using the Messaging API.

This guide helps you identify possible causes and resolve problems in your messaging integration.

API version

This guide applies to the Messaging API v3.3 Stable.


Conversation not found

Issue: Calling /messages/conversations does not return the expected conversation.

Possible causes and solutions

Possible causeRecommended action
Incorrect accommodation or reservation IDVerify that the identifiers match the reservation associated with the conversation.
Incorrect conversation IDIf retrieving by conversation ID, verify that it belongs to the specified accommodation.
Reservation not created successfullyCheck that /orders/create completed successfully and returned a reservation ID.
Conversation not yet availableAllow time for the conversation to become available after reservation creation, then retry according to your application's retry strategy.
Conversation not accessibleVerify that the conversation is available to your authenticated affiliate account.

Use /messages/conversations with one of the following combinations:

  • accommodation and reservation.
  • accommodation and conversation.

Provide either a reservation ID or a conversation ID together with the accommodation ID.

The current schema defines these as alternative request structures.


No messages returned when polling

Issue: /messages/latest returns an empty data.messages array or does not return the expected message.

Possible causes and solutions

Possible causeRecommended action
No new messages availableAn empty response can occur when there are no recent messages available to retrieve.
Message not yet availableAllow time for the message to become available before polling again.
Previous messages not confirmedCheck whether previously processed messages have been confirmed using /messages/latest/confirm.
Incorrect affiliate accountVerify that the request uses the expected X-Affiliate-Id and valid credentials.
Expected message belongs to another conversationCheck the conversation, accommodation and reservation identifiers returned by the API.

Use /messages/latest to retrieve recent messages.

Example request

POST /messages/latest

{}

By default, the endpoint returns up to 100 messages in reverse chronological order.

The /messages/latest endpoint retrieves recent messages available to your affiliate account, not only messages associated with a specific reservation.

Use the conversation identifiers returned in each message to identify the correct booking.


Messages not confirmed

Issue: Your application submits message IDs to /messages/latest/confirm, but one or more messages are not confirmed.

Possible causes and solutions

Possible causeRecommended action
Incorrect message IDUse the id returned for each message by /messages/latest, not the conversation or reservation ID.
Incorrect request structureProvide an array of message IDs in the messages field.
Confirmation result not checkedCompare the submitted IDs with the returned confirmedMessages array.
API request failedCheck the HTTP status code and response details before retrying.

Use /messages/latest/confirm to confirm receipt.

Example request

POST /messages/latest/confirm

{
  "messages": [
    "52100000-2be9-11f0-bced-bdc849c480b6"
  ]
}

Example response

{
  "request_id": "cdb0b154-2eae-481b-8fee-fb2725296e1f",
  "confirmedMessages": [
    "52100000-2be9-11f0-bced-bdc849c480b6"
  ]
}

The confirmedMessages array contains the IDs confirmed by the API.

Receipt confirmation

Confirm messages only after successfully processing them.

If an ID is missing from confirmedMessages, do not assume that its receipt was confirmed. Investigate the result before updating your application's confirmation state.


Unable to send a message

Issue: Calling /messages/send fails or does not return a message ID.

Possible causes and solutions

Possible causeRecommended action
Missing conversation IDProvide the existing conversation ID in the conversation field.
Reservation ID used instead of conversation IDRetrieve the conversation using /messages/conversations and use the returned data.conversation.id.
Missing required fieldsInclude accommodation, conversation and content in the request.
Incorrect accommodation IDVerify that the accommodation ID belongs to the specified conversation.
Invalid attachment IDIf attachments are included, verify that each ID was returned by a successful /messages/attachments/upload request.
Authentication or access issueVerify your credentials, affiliate identifier and access to the conversation.

Use /messages/send to send a message to an existing conversation.

Example request

POST /messages/send

{
  "accommodation": "13921698",
  "conversation": "bbb76179-7565-5a23-8632-33e164aa13db",
  "content": "Hello! Could you please confirm the check-in time?"
}

A successful response returns the message identifier in data.message.

Existing conversations

The /messages/send endpoint does not create conversations.

If you only have the reservation ID, retrieve the associated conversation using /messages/conversations before sending a message.


Automated replies not received

Issue: You send a message to the Demand API Messaging Test Hotel but do not receive the expected automated response.

The test accommodation (13921698) is configured to generate automated responses for selected messaging scenarios.

Check the test setup

CheckRecommended action
Test accommodationVerify that you're using accommodation ID 13921698 in the sandbox environment.
Test reservationConfirm that the reservation was created successfully and is associated with the test accommodation.
Conversation IDVerify that the message was sent to the conversation associated with the test reservation.
Supported test scenarioUse a scenario configured for the test hotel, such as a welcome message or an extra-bed request.
Message availabilityAllow time for the automated response to become available.

Check your API integration

  1. Call /messages/conversations to retrieve the conversation associated with the test reservation.
  2. Verify that your message was sent to the correct conversation.
  3. Poll /messages/latest for the automated response.
  4. Match the returned conversation identifiers to the test reservation.
  5. Confirm receipt after successfully processing the response.

The current Messaging API collection uses /messages/latest to retrieve new messages. It does not define a webhook endpoint for new-message notifications.

Automated responses might not be available immediately after a message is sent.

For practical examples, see Use case 1 – Booking and welcome message and Use case 2 – Send a request and handle rejection.


Attachment upload or download fails

Issue: Uploading, retrieving metadata or downloading an attachment does not succeed.

Possible causes and solutions

Possible causeRecommended action
Unsupported file formatUse PNG or JPEG images with an appropriate MIME type.
File exceeds the size limitEnsure the original binary file does not exceed 1,048,576 bytes (1 MiB).
Incorrect file sizeSet file_size to the original binary file size, not the length of the base64-encoded content.
Invalid base64 contentVerify that file_content contains the complete, correctly encoded image.
Incorrect attachment IDUse the attachment ID returned by /messages/attachments/upload or associated with an existing message.
Incorrect conversation contextVerify that the accommodation, conversation and attachment identifiers belong together.
Missing required upload fieldsInclude accommodation, conversation, file_size, file_name, file_type and file_content.

Attachment endpoints

EndpointPurpose
/messages/attachments/uploadUpload a base64-encoded image and retrieve its attachment ID.
/messages/attachments/metadataRetrieve the file name, MIME type and size of an attachment.
/messages/attachments/downloadRetrieve the base64-encoded content of an attachment.

For detailed examples, see Manage attachments.


Authentication and access errors

Issue: Messaging API requests fail because of authentication or access restrictions.

CheckRecommended action
Bearer tokenVerify that you're using a valid Demand API authentication token.
Affiliate identifierInclude the correct X-Affiliate-Id header.
EnvironmentVerify that you're sending requests to the intended sandbox or production environment.
API accessConfirm that your affiliate account has access to the Messaging API.
Conversation accessVerify that the requested conversation is available to your authenticated affiliate account.

For authentication details, see Authentication.


HTTP 500 Internal Server Error

Issue: A Messaging API request returns HTTP 500.

An HTTP 500 response indicates a server-side error. The current Messaging API schema does not define a specific cause for this response.

  1. Check the response details and retain the request_id, if returned.
  2. Verify that your request uses the correct endpoint and required fields.
  3. Check whether the failure is temporary before retrying.
  4. Avoid blindly retrying /messages/send, as this could result in duplicate messages if the original request was processed.
  5. If the issue persists, contact Booking.com support and provide the relevant request information.

Do not assume that an HTTP 500 response means the affiliate account is not onboarded or that the service is experiencing a cold start.

If access is uncertain, verify Messaging API availability for your affiliate account separately.


Rate limits

Issue: Messaging API requests are rejected because too many requests have been submitted.

Messaging API integrations should follow the applicable Demand API rate limits.

✅ Avoid excessive polling: Choose a polling interval appropriate for your application.

✅ Handle HTTP 429 responses: Follow the applicable rate-limit guidance and wait before retrying.

✅ Use backoff strategies: Increase the delay between retries when requests are repeatedly rate-limited.

✅ Avoid unnecessary requests: Use /messages/latest for ongoing synchronisation rather than repeatedly retrieving complete conversations.

For more information, see HTTP 4xx scenarios.


Before contacting support

If the issue persists, collect the following information to help investigate the problem:

InformationDescription
EndpointThe Messaging API endpoint and HTTP method used.
EnvironmentSandbox or production.
Request IDThe request_id returned by the API, if available.
HTTP status codeThe status code returned by the failed request.
Error detailsThe error response, with sensitive information removed.
Relevant identifiersAccommodation, conversation, reservation or message IDs, as applicable.
Time of failureThe approximate time when the issue occurred, including the time zone.
Sensitive information

Do not include API tokens, guest personal information or base64-encoded attachments in support requests unless explicitly required through an approved secure channel.


Additional resources