Inbound Message Webhook
When Everyware sends or receives a message attempt for one of your contacts, it makes an asynchronous post to the webhook you have marked for this functionality.
Phone Number FormatPhone numbers: All phone numbers in requests from Everyware are in E.164 format if possible. For example, (415) 555-4345 would come through as '+14155554345'.
Message (SMS) Request Parameters
| MessageSid | A 34 character unique identifier for the message. | 
| IndividualID | This is the Everyware unique identifier for the contact. | 
| ExternalID | This is the unique identifier that you provided on the initial call to create the contact. | 
| DirectionID | This is to identify if the message is inbound to Everyware or outbound to the customer. “1” will indicate inbound, and “2” will indicate outbound. | 
| From | The phone number that sent this message. On outbound messages this will be the phone number Everyware has assigned to your account. | 
| To | The phone number of the recipient. On inbound messages this will be the phone number | 
| Body | The text body of the message. Up to 600 characters long. | 
| NumMedia | The number of photos associated with your message | 
Media Message (MMS) Request Parameters
Everyware also sends the following parameters when there are media, such as images, associated with the message:
| MediaContentType {N} | The ContentTypes for the Media stored at MediaUrl {N}. The order of MediaContentType{N}matches the order of MediaUrl{N}. If more than one media element is indicated by NumMedia than MediaContentType{N}will be used, where N is the zero-based index of the Media (e.g. MediaContentType0) | 
| MediaUrl {N} | A URL referencing the content of the media received in the Message. If more than one media element is indicated by NumMedia than MediaUrl {N}will be used, where N is the zero-based index of the Media (e.g. MediaUrl0) | 
Inbound Message Sample Code
<?xml version="1.0" encoding=" application/x-www-form-urlencoded "?>  
<request>  
  <MessageSid>5F4A79ED-E899-473B-AA0C-7B5710FE25B2</MessageSid>  
  <IndividualID>1977843</IndividualID>  
  <ExternalID>TJ3434</ExternalID>  
  <DirectionID>1</DirectionID>  
  <From>+14695551234</From>  
  <To>+15123399500</To>  
  <Body>Look at this media I attached for you.</Body>  
  <NumMedia>2</NumMedia>  
  <MediaContentType0>image/gif</MediaContentType0>  
  <MediaUrl0>https://demo.everyware.com/owl.gif</MediaUrl0>  
  <MediaContentType1>application/pdf</MediaContentType1>  
  <MediaUrl1>https://demo.everyware.com/memo.pdf</MediaUrl1>  
</request>Updated 7 months ago
