Third Party Web Hooks

Introduction

MessageNet users can configure their service to automatically call third party webhooks upon receipt of a reply to a sent message.

The first configuration option consists of a ReplyType (HTTP / HTTPGET / HTTPPOST) and a ReplyPath - the endpoint for the webhook.

When using the GET method, parameters will be included via the querystring, for POST the same values will be encoded as form post arguments.

The second option allows a user to forward a message to an endpoint based on keyword matching. This is performed via POST and the data is encoded as JSON in the post body.

Methods

HTTP GET http://yourdomain.com/yourendpoint

Users can configure their ReplyType to HTTP/HTTPGET to call a webhook via GET when recieving replies from customers.

A number of parameters can be optionally included in the ReplyPath configuration, shown below.

Please note that the names in the key/value pairs will be determined by the user configuring the entry.

Parameters

Parameters will be passed as querystring values in the url.

  • #FROM# - The phone number of the replying customer.
  • #TO# - The phone number the customer is replying to.
  • #MSG# - The message body sent in the reply.
  • #SENTDTS# - The time the reply was sent by the customer, format "dd-MMM-yyyy HH:mm:ss"
  • #RCVDDTS" - The time the reply was received by the system, format "dd-MMM-yyyy HH:mm:ss"

Example Request

GET /yourendpoint?from=0411222333&sentAt=01-Jan-2018%2001:01:01
Host: yourdomain.com

Response

Our system expects an 'OK' response from the webhook endpoint to indicate the message has been received successfully.

HTTP POST http://yourdomain.com/yourendpoint

Users can configure their ReplyType to HTTPPOST to call a webhook via POST when recieving replies from customers.

A number of parameters can be optionally included in the ReplyPath configuration, shown below.

Please note that the names in the key/value pairs will be determined by the user configuring the entry.

Parameters

Parameters will be passed as form post arguments in the post body.

  • #FROM# - The phone number of the replying customer.
  • #TO# - The phone number the customer is replying to.
  • #MSG# - The message body sent in the reply.
  • #SENTDTS# - The time the reply was sent by the customer, format "dd-MMM-yyyy HH:mm:ss"
  • #RCVDDTS" - The time the reply was received by the system, format "dd-MMM-yyyy HH:mm:ss"

Example Request

POST /yourendpoint
Host: yourdomain.com
Content-Length: 45
Content-Type: application/x-www-form-urlencoded

from=0411222333&sentAt=01-Jan-2018%2001:01:01

Response

Our system expects an 'OK' response from the webhook endpoint to indicate the message has been received successfully.