We have recently released a new REST API for MultiTXT customers to use for sending and receiving messages. Full documentation of this API is available here
A webhook (or callback) enables our platform to ping your application with information about a given event (such as a new inbound SMS received). This happens in real-time, allowing you to leverage the platform to create your own 2-way messaging solutions by sending SMS via the API, and processing any responses via Webhooks.
Common events that you will want to listen to:
- SMS -> Receive SMS
- SMS -> Opt-out occurred
- Delivery Reports -> Message is delivered
- Delivery Reports -> Message has expired
To create a webhook, log in, and go to Configuration > Webhooks and select "New Webhook"
Set up the basics of your webhook:
- Select the event(s) you want to listen for, (e.g. SMS -> Receive SMS)
- Select the HTTP Method you want us to send to your application (e.g. POST)
- Enter the URL where you want to process the event (e.g. https://yourapplication.com/sms/inbound-sms)
Next, specify any headers you would like present in your request.
Finally, specify the content to passed in the content of the request to the specified endpoint. A good default to specify would be the following:
Finally, hit save.
In this example, we created a webhook that will POST to https://yourapplication.com/sms/inbound-sms when you receive a SMS, as a JSON request with the following information in the JSON body: id, accountId, sourceAddress, destinationAddress, messageContent, replyContent.