Webhooks - Integration Overview

The Webhook integration enables the synchronization of messages that are sent or received to a user's phone number with external systems like CRMs, Support Desk software, and more.

Relay sends a POST to the Relay Webhook URL when a message is sent or received. The POST body is formatted as such:

{
MessageID: 'abc123xyz', // the unique message ID
ConversationID: "xyz321cba", //the unique contact ID
ToNumber: "+15555555555", //the number the message was sent to
FromNumber: "+13333333333", //the number the message was sent from
MessageBody: "Hello, world!", //the message body
MessageDirection: "in", //the message direction (either "in" or "out")
TextableUserID: "lmnopqrstuv", //the user id of the account that sent or received the message,
ContactName: "John Doe", //the Full Name property of the contact,
ContactEmail: "john.doe@gmail.com", //the e-mail address of the contact (if available)
Media: ["https://sampleUrl.com/URL1","https://sampleUrl.com/URL2"], //all MMS attachment urls associated with the message (if any)
}