Some features are only available on particular plans or as paid add-ons and you can check inclusions on our pricing page. If you have any other questions, contact support and we can review your plan and provide you with options, including to speak to one of our Customer Success team.
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
Create a webhook
-
Navigate to Settings > API and select the Webhooks tab, then click 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 to present in your request. To add additional header rows, simply click Add Header:
- Next, specify the content to be passed in the content of the request to the specified endpoint. A good default to specify would be the following:
| id | $mtID |
| accountId | $accountId |
| sourceAddress | $sourceAddress |
| destinationAddress | $destinationAddress |
| messageContent | $mtContent |
| replyContent | $moContent |
- Finally, click Save Webhook in the bottom right of the screen.
In this example, we created a webhook that will POST to https://yourapplication.com/sms/inbound-sms when you receive an SMS, as a JSON request with the following information in the JSON body: id, accountId, sourceAddress, destinationAddress, messageContent, replyContent.