Receiving SMS and webhook setup for SMS notifications
Last updated
Last updated
The easiest way to see the SMS that were sent as a reply to your messages is , where you can see all the SMS that you have sent to your customers, and their replies, and send even have an SMS conversation with them, just like using a chat application.
However, if you would like to handle inbound and outbound SMS yourself, e.g. do some automated actions when you send or receive them, or send a notification to yourself, you can provide a webhook (callback url) that we will send you an HTTP POST request to when that happens.
To start receiving requests for the messages, head out to , and under Webhook settings, fill out your endpoint URL, and fill out or generate a secret that we will send you in our request body, so you can verify that the requests are coming from us (only you and us know that secret). You can enter two webhooks there. One that notifies you about the received messages, and the other notifies you about the messages you sent.
To handle our HTTP POST request, you can use any web application framework, such as Laravel, Django, Express.js, Spring or ASP.NET.
Here is the example of the endpoint definition for Express.js:
The request consists of a JSON body with these fields:
phone_number
, the sender phone number
text
, the message body
secret
, it should be the same as the secret that you have provided in the API console
sent
, boolean, true if you sent the message, false otherwise
received
, boolean, true if you received the message, false otherwise
timestamp
, JS timestamp (miliseconds)
portal
, only in sent messages, boolean, true if you sent the message from TextLink console
If your webhook does not return status 200, we will assume that the request was not successful, and we will notify you about it via e-mail. You can also just click the Test webhook button on our API console, to receive a test message to your webhook, and see if it works.
We also support webhooks for message dispatch event, and for the failed message event. If you need any more help with webhooks, or have a suggestion, contact us at