The message.received webhook event is triggered whenever a lead sends a message via SMS or email. This can be used to track incoming communication.

Payload

SMS Example

{
  "event": "message.received",
  "data": {
    "leadId": "c4f23a1b-d8e5-4f67-90c1-2a5b8d3e9x7y",
    "phone": "+12025550189",
    "channel": "sms",
    "profile": "Default Profile",
    "content": {
      "text": "hello, are you available?"
    }
  },
  "timestamp": "2024-01-15T14:30:00Z"
}

Email Example

{
  "event": "message.received",
  "data": {
    "leadId": "c4f23a1b-d8e5-4f67-90c1-2a5b8d3e9x7y",
    "phone": "+12025550189",
    "channel": "email",
    "profile": "Default Profile",
    "content": {
      "subject": "Re: Information about your services",
      "text": "hello, are you available?"
    }
  },
  "timestamp": "2024-01-15T14:30:00Z"
}

Properties

PropertyTypeDescription
eventstringThe webhook event type (message.received).
data.leadIdstringThe unique identifier for the lead.
data.phonestringThe phone number of the lead.
data.channelstringThe communication channel. Can be sms or email.
data.profilestringThe customer profile assigned to the lead.
data.content.subjectstringThe subject line of the email. Only included for email messages, not SMS.
data.content.textstringThe content of the message received from the lead.
timestampstringThe ISO 8601 timestamp when the message was received.