# Retrieve latest messages

Use this endpoint to fetch the most recent messages, including messages sent by both the property and the guest. By default, up to 100 messages are returned in reverse chronological order (newest first).

This endpoint is ideal for:
- Synchronising message threads between your system and the Booking.com platform.
- Polling for updates to detect new messages since your last request.

Endpoint: POST /messages/latest
Version: 3.2-Beta
Security: BearerAuth

## Header parameters:

  - `X-Affiliate-Id` (integer, required)
    Include here your Affiliate identifier number

## Response 200 fields (application/json):

  - `request_id` (string)
    Uniquely identifies the request. Please provide this identifier when contacting support.

  - `data` (object)

  - `data.messages` (array)
    List of recent messages in reverse chronological order.

  - `data.messages.conversation` (object)

  - `data.messages.conversation.id` (string)
    The unique identifier of the conversation

  - `data.messages.conversation.accommodation` (string)
    The unique identifier of the property

  - `data.messages.conversation.reservation` (string)
    The unique identifier of the reservation

  - `data.messages.content` (string)
    The body of the message.

  - `data.messages.id` (string)
    A unique identifier for the message.

  - `data.messages.sender` (object)

  - `data.messages.sender.participant` (string)
    A unique identifier for the conversation participant.

  - `data.messages.sender.metadata` (object)

  - `data.messages.sender.metadata.type` (string)
    Specifies the conversation participant type.
    Enum: "guest", "property"

  - `data.messages.sender.metadata.name` (string)
    The display name of the participant (e.g., guest or property name).

  - `data.messages.attachments` (array)

  - `data.messages.timestamp` (string)
    The timestamp in ISO-8601 format from which the message is sent. Format: YYYY-MM-DDTHH:mm:ss+00:00


