Overview
The Messaging API enables direct communication between tourists and guides through threaded conversations. Messages are organized into chat threads for easy conversation management.Send Message
Endpoint
Request Body
The ID of the chat thread where this message belongs
The user ID of the message sender
The content of the message (supports TEXT content)
Type of message being sentEnum values:
TEXT- Regular text messageSYSTEM- System-generated message (e.g., “Tour booked”)IMAGE- Image attachmentFILE- File attachment
Response
Unique identifier for the created message
The chat thread ID this message belongs to
User ID of the sender
The message content
Type of the message (TEXT, SYSTEM, IMAGE, FILE)
Timestamp when the message was sent (ISO 8601 format)
Timestamp when the message was read (null if unread)
Example Response
Get Messages by Thread
Endpoint
Path Parameters
The unique identifier of the chat thread to retrieve messages from
Response
Returns an array of ChatMessage objects ordered chronologically.List of all messages in the thread
Example Response
Message Types
The messaging system supports different message types:TEXT
Standard text messages sent between users. This is the most common message type for regular conversation.SYSTEM
Automated system messages that provide updates about bookings, payments, or other platform events. Example system messages:- “Tour booking confirmed for March 15, 2026”
- “Payment of €150 received”
- “Carlos has updated the tour details”
IMAGE
Messages containing image attachments. Thebody field contains the image URL or reference.
FILE
Messages with file attachments (PDFs, documents, etc.). Thebody field contains the file URL or reference.
Best Practices
Real-time Updates
Consider implementing WebSocket connections or polling for real-time message delivery and read receipts.Message Pagination
For threads with many messages, implement pagination on the client side to load messages in batches.Read Receipts
Update thereadAt timestamp when a user views messages to provide accurate read receipt functionality.
Error Handling
Handle cases where:- Thread doesn’t exist
- User doesn’t have permission to access the thread
- Message body exceeds maximum length