curl --request POST \
--url https://your-instance.example.com/api/webhook/twilio/sms \
--header 'Content-Type: application/json' \
--data '
{
"From": "+14165550100",
"To": "+12362320246",
"Body": "Hey, can you call me back?",
"MessageSid": "SM5f7b1c2e8a1d4e0012c3b4a5",
"NumMedia": "0"
}
'import requests
url = "https://your-instance.example.com/api/webhook/twilio/sms"
payload = {
"From": "+14165550100",
"To": "+12362320246",
"Body": "Hey, can you call me back?",
"MessageSid": "SM5f7b1c2e8a1d4e0012c3b4a5",
"NumMedia": "0"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
From: '+14165550100',
To: '+12362320246',
Body: 'Hey, can you call me back?',
MessageSid: 'SM5f7b1c2e8a1d4e0012c3b4a5',
NumMedia: '0'
})
};
fetch('https://your-instance.example.com/api/webhook/twilio/sms', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-instance.example.com/api/webhook/twilio/sms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'From' => '+14165550100',
'To' => '+12362320246',
'Body' => 'Hey, can you call me back?',
'MessageSid' => 'SM5f7b1c2e8a1d4e0012c3b4a5',
'NumMedia' => '0'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.example.com/api/webhook/twilio/sms"
payload := strings.NewReader("{\n \"From\": \"+14165550100\",\n \"To\": \"+12362320246\",\n \"Body\": \"Hey, can you call me back?\",\n \"MessageSid\": \"SM5f7b1c2e8a1d4e0012c3b4a5\",\n \"NumMedia\": \"0\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://your-instance.example.com/api/webhook/twilio/sms")
.header("Content-Type", "application/json")
.body("{\n \"From\": \"+14165550100\",\n \"To\": \"+12362320246\",\n \"Body\": \"Hey, can you call me back?\",\n \"MessageSid\": \"SM5f7b1c2e8a1d4e0012c3b4a5\",\n \"NumMedia\": \"0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/webhook/twilio/sms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"From\": \"+14165550100\",\n \"To\": \"+12362320246\",\n \"Body\": \"Hey, can you call me back?\",\n \"MessageSid\": \"SM5f7b1c2e8a1d4e0012c3b4a5\",\n \"NumMedia\": \"0\"\n}"
response = http.request(request)
puts response.read_body"<?xml version=\"1.0\" encoding=\"UTF-8\"?><Response></Response>"{
"error": "Webhook processing failed"
}Handle inbound SMS webhook (Twilio)
Inbound webhook called by Twilio when an SMS or MMS is delivered to a Tether-provisioned Twilio number. Persists the message and any attached media, drives automation/AI replies, and responds with empty TwiML.
curl --request POST \
--url https://your-instance.example.com/api/webhook/twilio/sms \
--header 'Content-Type: application/json' \
--data '
{
"From": "+14165550100",
"To": "+12362320246",
"Body": "Hey, can you call me back?",
"MessageSid": "SM5f7b1c2e8a1d4e0012c3b4a5",
"NumMedia": "0"
}
'import requests
url = "https://your-instance.example.com/api/webhook/twilio/sms"
payload = {
"From": "+14165550100",
"To": "+12362320246",
"Body": "Hey, can you call me back?",
"MessageSid": "SM5f7b1c2e8a1d4e0012c3b4a5",
"NumMedia": "0"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
From: '+14165550100',
To: '+12362320246',
Body: 'Hey, can you call me back?',
MessageSid: 'SM5f7b1c2e8a1d4e0012c3b4a5',
NumMedia: '0'
})
};
fetch('https://your-instance.example.com/api/webhook/twilio/sms', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-instance.example.com/api/webhook/twilio/sms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'From' => '+14165550100',
'To' => '+12362320246',
'Body' => 'Hey, can you call me back?',
'MessageSid' => 'SM5f7b1c2e8a1d4e0012c3b4a5',
'NumMedia' => '0'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.example.com/api/webhook/twilio/sms"
payload := strings.NewReader("{\n \"From\": \"+14165550100\",\n \"To\": \"+12362320246\",\n \"Body\": \"Hey, can you call me back?\",\n \"MessageSid\": \"SM5f7b1c2e8a1d4e0012c3b4a5\",\n \"NumMedia\": \"0\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://your-instance.example.com/api/webhook/twilio/sms")
.header("Content-Type", "application/json")
.body("{\n \"From\": \"+14165550100\",\n \"To\": \"+12362320246\",\n \"Body\": \"Hey, can you call me back?\",\n \"MessageSid\": \"SM5f7b1c2e8a1d4e0012c3b4a5\",\n \"NumMedia\": \"0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/webhook/twilio/sms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"From\": \"+14165550100\",\n \"To\": \"+12362320246\",\n \"Body\": \"Hey, can you call me back?\",\n \"MessageSid\": \"SM5f7b1c2e8a1d4e0012c3b4a5\",\n \"NumMedia\": \"0\"\n}"
response = http.request(request)
puts response.read_body"<?xml version=\"1.0\" encoding=\"UTF-8\"?><Response></Response>"{
"error": "Webhook processing failed"
}Body
Sender phone number in E.164 (e.g. +14165550100).
Tether-provisioned Twilio number that received the message.
SMS/MMS text content.
Twilio-assigned message identifier (SM… for SMS, MM… for MMS).
Count of attached media items as a string; 0 for plain SMS.
URL of the first media attachment (Twilio CDN); additional MediaUrlN fields appear when NumMedia > 1.
MIME type of the first media attachment, e.g. image/jpeg.
Response
Empty TwiML response acknowledging receipt. Tether handles persistence + automation server-side; Twilio expects empty TwiML.
The response is of type string.