curl --request POST \
--url https://your-instance.example.com/api/webhook/textgrid/sms \
--header 'Content-Type: application/json' \
--data '
{
"AccountSid": "AC8a1d4e0012c3b4a55f7b1c2e8a",
"MessageSid": "TG5f7b1c2e8a1d4e0012c3b4a5",
"From": "+14165550100",
"To": "+12362320246",
"Body": "Picking up at 5pm, thanks!",
"NumMedia": "0"
}
'import requests
url = "https://your-instance.example.com/api/webhook/textgrid/sms"
payload = {
"AccountSid": "AC8a1d4e0012c3b4a55f7b1c2e8a",
"MessageSid": "TG5f7b1c2e8a1d4e0012c3b4a5",
"From": "+14165550100",
"To": "+12362320246",
"Body": "Picking up at 5pm, thanks!",
"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({
AccountSid: 'AC8a1d4e0012c3b4a55f7b1c2e8a',
MessageSid: 'TG5f7b1c2e8a1d4e0012c3b4a5',
From: '+14165550100',
To: '+12362320246',
Body: 'Picking up at 5pm, thanks!',
NumMedia: '0'
})
};
fetch('https://your-instance.example.com/api/webhook/textgrid/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/textgrid/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([
'AccountSid' => 'AC8a1d4e0012c3b4a55f7b1c2e8a',
'MessageSid' => 'TG5f7b1c2e8a1d4e0012c3b4a5',
'From' => '+14165550100',
'To' => '+12362320246',
'Body' => 'Picking up at 5pm, thanks!',
'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/textgrid/sms"
payload := strings.NewReader("{\n \"AccountSid\": \"AC8a1d4e0012c3b4a55f7b1c2e8a\",\n \"MessageSid\": \"TG5f7b1c2e8a1d4e0012c3b4a5\",\n \"From\": \"+14165550100\",\n \"To\": \"+12362320246\",\n \"Body\": \"Picking up at 5pm, thanks!\",\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/textgrid/sms")
.header("Content-Type", "application/json")
.body("{\n \"AccountSid\": \"AC8a1d4e0012c3b4a55f7b1c2e8a\",\n \"MessageSid\": \"TG5f7b1c2e8a1d4e0012c3b4a5\",\n \"From\": \"+14165550100\",\n \"To\": \"+12362320246\",\n \"Body\": \"Picking up at 5pm, thanks!\",\n \"NumMedia\": \"0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/webhook/textgrid/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 \"AccountSid\": \"AC8a1d4e0012c3b4a55f7b1c2e8a\",\n \"MessageSid\": \"TG5f7b1c2e8a1d4e0012c3b4a5\",\n \"From\": \"+14165550100\",\n \"To\": \"+12362320246\",\n \"Body\": \"Picking up at 5pm, thanks!\",\n \"NumMedia\": \"0\"\n}"
response = http.request(request)
puts response.read_body"<?xml version=\"1.0\" encoding=\"UTF-8\"?><Response></Response>"Handle inbound SMS/MMS webhook (TextGrid)
Inbound webhook called by TextGrid when an SMS or MMS is delivered to a Tether-provisioned number. Payload shape matches Twilio (AccountSid, MessageSid, Body, From, To, NumMedia, MediaUrl*). Responds with empty TwiML.
curl --request POST \
--url https://your-instance.example.com/api/webhook/textgrid/sms \
--header 'Content-Type: application/json' \
--data '
{
"AccountSid": "AC8a1d4e0012c3b4a55f7b1c2e8a",
"MessageSid": "TG5f7b1c2e8a1d4e0012c3b4a5",
"From": "+14165550100",
"To": "+12362320246",
"Body": "Picking up at 5pm, thanks!",
"NumMedia": "0"
}
'import requests
url = "https://your-instance.example.com/api/webhook/textgrid/sms"
payload = {
"AccountSid": "AC8a1d4e0012c3b4a55f7b1c2e8a",
"MessageSid": "TG5f7b1c2e8a1d4e0012c3b4a5",
"From": "+14165550100",
"To": "+12362320246",
"Body": "Picking up at 5pm, thanks!",
"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({
AccountSid: 'AC8a1d4e0012c3b4a55f7b1c2e8a',
MessageSid: 'TG5f7b1c2e8a1d4e0012c3b4a5',
From: '+14165550100',
To: '+12362320246',
Body: 'Picking up at 5pm, thanks!',
NumMedia: '0'
})
};
fetch('https://your-instance.example.com/api/webhook/textgrid/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/textgrid/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([
'AccountSid' => 'AC8a1d4e0012c3b4a55f7b1c2e8a',
'MessageSid' => 'TG5f7b1c2e8a1d4e0012c3b4a5',
'From' => '+14165550100',
'To' => '+12362320246',
'Body' => 'Picking up at 5pm, thanks!',
'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/textgrid/sms"
payload := strings.NewReader("{\n \"AccountSid\": \"AC8a1d4e0012c3b4a55f7b1c2e8a\",\n \"MessageSid\": \"TG5f7b1c2e8a1d4e0012c3b4a5\",\n \"From\": \"+14165550100\",\n \"To\": \"+12362320246\",\n \"Body\": \"Picking up at 5pm, thanks!\",\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/textgrid/sms")
.header("Content-Type", "application/json")
.body("{\n \"AccountSid\": \"AC8a1d4e0012c3b4a55f7b1c2e8a\",\n \"MessageSid\": \"TG5f7b1c2e8a1d4e0012c3b4a5\",\n \"From\": \"+14165550100\",\n \"To\": \"+12362320246\",\n \"Body\": \"Picking up at 5pm, thanks!\",\n \"NumMedia\": \"0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/webhook/textgrid/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 \"AccountSid\": \"AC8a1d4e0012c3b4a55f7b1c2e8a\",\n \"MessageSid\": \"TG5f7b1c2e8a1d4e0012c3b4a5\",\n \"From\": \"+14165550100\",\n \"To\": \"+12362320246\",\n \"Body\": \"Picking up at 5pm, thanks!\",\n \"NumMedia\": \"0\"\n}"
response = http.request(request)
puts response.read_body"<?xml version=\"1.0\" encoding=\"UTF-8\"?><Response></Response>"Body
TextGrid inbound SMS/MMS payload. Shape matches Twilio — additional MediaUrlN / MediaContentTypeN fields appear when NumMedia > 0.
TextGrid account identifier that owns the receiving number.
TextGrid-assigned message identifier.
Sender phone number in E.164.
Tether-provisioned TextGrid number that received the message.
SMS/MMS text content.
Count of attached media items as a string; 0 for plain SMS.
URL of the first media attachment; additional MediaUrlN fields appear when NumMedia > 1.
MIME type of the first media attachment, e.g. image/jpeg.
Response
Empty TwiML response acknowledging receipt. TextGrid persists the message + drives automation server-side; no TwiML is returned to the caller.
The response is of type string.