# Fetch latest messages

Retrieves up to 100 of the most recent messages including messages from both property and guest.

- Messages are returned in reverse chronological order (newest first).
- Use this endpoint to sync message threads or poll for updates.

Important:  To retrieve the latest messages, send an empty POST request.  Any content in the request body will be ignored.

Endpoint: POST /messages/latest
Version: 3.1
Security: BearerAuth

## Header parameters:

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

## Response 200 fields (application/json):

  - `request_id` (string)
    Unique identifier for this request. Provide this ID when contacting support.

  - `data` (object)

  - `data.messages` (array)

  - `data.messages.message_id` (string)
    Unique identifier of the message.

  - `data.messages.reply_to` (string,null)
    ID of the message this is replying to (if applicable).

  - `data.messages.conversation` (object)

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

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

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

  - `data.messages.content` (string)
    Message text content.

  - `data.messages.sender` (object)

  - `data.messages.sender.participant_id` (string)
    Unique identifier of the conversation participant.

  - `data.messages.sender.metadata` (object)
    Additional metadata about the sender.

  - `data.messages.attachments` (array)

  - `data.messages.timestamp` (string)
    Timestamp in ISO 8601 format (UTC) when the message was sent.


