Skip to main content

Base URL

EnvironmentBase URL
Productionhttps://api.travtus.com

Endpoint

POST /messages/

Accepts inbound messages from supported channels.

Headers

HeaderRequiredDescription
Content-TypeYesMust be application/json

Conversation Context

To maintain conversation continuity, include a conversation_id in your message.
If omitted for Web Chat, Travtus generates one automatically and returns it in the webhook.

Common Fields

FieldTypeRequiredDescription
channelstringYes"sms", "email", or "web_chat"
group_idUUIDConditionalInternal group/portfolio ID
group_external_refstringConditionalExternal group/portfolio reference

SMS Messages

Example

{
  "channel": "sms",
  "group_external_ref": "portfolio_123",
  "sms": {
    "source": "twilio",
    "message_id": "SM123456789",
    "text": "Hello, I'm interested in the apartment.",
    "created_datetime": "2024-03-15T11:30:00Z",
    "phone_number": "+1234567890",
    "conversation_id": "conv_abc123"
  }
}
FieldTypeRequiredDescription
sms.sourcestringNoSMS provider name (default "unknown")
sms.message_idstringYesUnique message identifier
sms.textstringYesMessage content
sms.created_datetimestringYesISO 8601 timestamp
sms.phone_numberstringYesSender’s phone number (E.164 format)
sms.conversation_idstringYesConversation thread ID

Email Messages

Example

{
  "channel": "email",
  "group_external_ref": "portfolio_123",
  "email": {
    "source": "sendgrid",
    "message_id": "email-msg-001",
    "text": "Hello, I would love to learn more about unit 2A.",
    "created_datetime": "2024-03-15T11:31:02Z",
    "from_email_address": "[email protected]",
    "to_email_addresses": "[email protected]",
    "subject": "Interested in unit 2A",
    "conversation_id": "conv_abc123"
  }
}
FieldTypeRequiredDescription
email.sourcestringNoEmail provider name (default "unknown")
email.message_idstringYesUnique message ID
email.textstringYesMessage body (plain text)
email.created_datetimestringYesISO 8601 timestamp
email.from_email_addressstringYesSender email
email.to_email_addressesstringYesRecipient email(s)
email.subjectstringYesSubject line
email.conversation_idstringYesConversation thread ID

Web Chat Messages

Example

{
  "channel": "web_chat",
  "group_id": "portfolio_123",
  "web_chat": {
    "source": "chat_service",
    "message_id": "msg_123456789",
    "text": "Hello, I have a question about my lease.",
    "created_datetime": "2024-03-15T11:30:00Z",
    "conversation_id": "conv_abc123",
    "sender_ext_ref": "user_456",
    "name": "John Doe",
    "agent_id": "agent_123"
  }
}
FieldTypeRequiredDescription
web_chat.sourcestringNoChat platform name
web_chat.message_idstringYesUnique message identifier
web_chat.textstringYesMessage content
web_chat.created_datetimestringYesISO 8601 timestamp
web_chat.conversation_idstringNoAutomatically generated if missing
web_chat.sender_ext_refstringNoExternal sender identifier
web_chat.namestringNoSender name
web_chat.agent_idstringNoAgent identifier (for agent-originated messages)

Response

Example:
{
  "request_id": "550e8400-e29b-41d4-a716-446655440000"
}
FieldTypeDescription
request_idstringUnique identifier for tracking the request