Webhooks (handle received SMS + more)
Last updated
Last updated
There are 4 webhooks that we can send to your custom server (or custom no-code workflow):
Received messages - Triggered whenever you receive a message.
Sent messages - Triggered whenever you dispatch an action for sending SMS.
Failed messages - Triggered whenever a message fails (in case of failed messages you firstly get a Sent message webhook, and then failed message webhook)
Changed contact tag - Triggered whenever a contact tag is changed (E.g. Cold -> Warm)
Webhook request contains JSON body like this:
Though fields can differ based on webhook type.
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.
If you specified a secret, we will send it to you in each request, so you can verify the request is coming from TextLink's servers. Make sure it is a secret string that only you know.
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:
name
the name of the contact (if you have created a contact for that phone number), tag
is the name of the new tag, and subuser_id
is optional parameter that shows your TextLink subuser ID that received the webhook, if it was sent to a subuser and not to the admin account.
To make TextLink send request to your webhook, you just need to plug it in the corresponding webhook url field in , and click save. You can click Test webhooks button to get a sample request to each of your webhooks and to see if they are working. Maximum length of webhook string is 300 characters.
You can see it in the sample body above, and for and , we have a specific section on their corresponding documentation pages.
You can see the example of using and on their documentation pages. The other no-code tools function the similar way. If you need any help with other integrations, please feel free to reach us at
Where tag
is the custom tag defined in the or , and name
is the name of the contact (if you have created a contact for that phone number).
portal
is true if message is sent through , and sim_card_id
is the id of the SIM card that the message was dispatched to.
portal
is true if message is sent through , and sim_card_id
is the id of the SIM card that the message was dispatched to. custom_id
is the custom id you have provided in the send SMS API if you provided it, and textlink_id
is the message ID in the TextLink database.