Handle inbound SMS webhook (Sinch)
curl --request POST \
--url https://your-instance.example.com/api/webhook \
--header 'Content-Type: application/json' \
--data '
{
"id": "01K608PQBF3H41EQS64AH7CE11",
"from": "14165550100",
"to": "12362320246",
"body": "Hey, can you call me back?",
"operator_id": "310010",
"received_at": "2026-05-18T15:04:01.135Z",
"type": "mo_text"
}
'import requests
url = "https://your-instance.example.com/api/webhook"
payload = {
"id": "01K608PQBF3H41EQS64AH7CE11",
"from": "14165550100",
"to": "12362320246",
"body": "Hey, can you call me back?",
"operator_id": "310010",
"received_at": "2026-05-18T15:04:01.135Z",
"type": "mo_text"
}
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({
id: '01K608PQBF3H41EQS64AH7CE11',
from: '14165550100',
to: '12362320246',
body: JSON.stringify('Hey, can you call me back?'),
operator_id: '310010',
received_at: '2026-05-18T15:04:01.135Z',
type: 'mo_text'
})
};
fetch('https://your-instance.example.com/api/webhook', 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",
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([
'id' => '01K608PQBF3H41EQS64AH7CE11',
'from' => '14165550100',
'to' => '12362320246',
'body' => 'Hey, can you call me back?',
'operator_id' => '310010',
'received_at' => '2026-05-18T15:04:01.135Z',
'type' => 'mo_text'
]),
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"
payload := strings.NewReader("{\n \"id\": \"01K608PQBF3H41EQS64AH7CE11\",\n \"from\": \"14165550100\",\n \"to\": \"12362320246\",\n \"body\": \"Hey, can you call me back?\",\n \"operator_id\": \"310010\",\n \"received_at\": \"2026-05-18T15:04:01.135Z\",\n \"type\": \"mo_text\"\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")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"01K608PQBF3H41EQS64AH7CE11\",\n \"from\": \"14165550100\",\n \"to\": \"12362320246\",\n \"body\": \"Hey, can you call me back?\",\n \"operator_id\": \"310010\",\n \"received_at\": \"2026-05-18T15:04:01.135Z\",\n \"type\": \"mo_text\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/webhook")
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 \"id\": \"01K608PQBF3H41EQS64AH7CE11\",\n \"from\": \"14165550100\",\n \"to\": \"12362320246\",\n \"body\": \"Hey, can you call me back?\",\n \"operator_id\": \"310010\",\n \"received_at\": \"2026-05-18T15:04:01.135Z\",\n \"type\": \"mo_text\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Webhook received",
"messageId": "01K608PQBF3H41EQS64AH7CE11"
}{
"error": "Webhook processing failed"
}Webhooks
Handle inbound SMS webhook (Sinch)
Inbound webhook called by Sinch when an SMS is delivered to a Tether-provisioned number. Responds 200 immediately to prevent Sinch retries and processes the message asynchronously (contact upsert, conversation routing, automation triggering, AI reply pipeline).
POST
/
api
/
webhook
Handle inbound SMS webhook (Sinch)
curl --request POST \
--url https://your-instance.example.com/api/webhook \
--header 'Content-Type: application/json' \
--data '
{
"id": "01K608PQBF3H41EQS64AH7CE11",
"from": "14165550100",
"to": "12362320246",
"body": "Hey, can you call me back?",
"operator_id": "310010",
"received_at": "2026-05-18T15:04:01.135Z",
"type": "mo_text"
}
'import requests
url = "https://your-instance.example.com/api/webhook"
payload = {
"id": "01K608PQBF3H41EQS64AH7CE11",
"from": "14165550100",
"to": "12362320246",
"body": "Hey, can you call me back?",
"operator_id": "310010",
"received_at": "2026-05-18T15:04:01.135Z",
"type": "mo_text"
}
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({
id: '01K608PQBF3H41EQS64AH7CE11',
from: '14165550100',
to: '12362320246',
body: JSON.stringify('Hey, can you call me back?'),
operator_id: '310010',
received_at: '2026-05-18T15:04:01.135Z',
type: 'mo_text'
})
};
fetch('https://your-instance.example.com/api/webhook', 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",
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([
'id' => '01K608PQBF3H41EQS64AH7CE11',
'from' => '14165550100',
'to' => '12362320246',
'body' => 'Hey, can you call me back?',
'operator_id' => '310010',
'received_at' => '2026-05-18T15:04:01.135Z',
'type' => 'mo_text'
]),
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"
payload := strings.NewReader("{\n \"id\": \"01K608PQBF3H41EQS64AH7CE11\",\n \"from\": \"14165550100\",\n \"to\": \"12362320246\",\n \"body\": \"Hey, can you call me back?\",\n \"operator_id\": \"310010\",\n \"received_at\": \"2026-05-18T15:04:01.135Z\",\n \"type\": \"mo_text\"\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")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"01K608PQBF3H41EQS64AH7CE11\",\n \"from\": \"14165550100\",\n \"to\": \"12362320246\",\n \"body\": \"Hey, can you call me back?\",\n \"operator_id\": \"310010\",\n \"received_at\": \"2026-05-18T15:04:01.135Z\",\n \"type\": \"mo_text\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/webhook")
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 \"id\": \"01K608PQBF3H41EQS64AH7CE11\",\n \"from\": \"14165550100\",\n \"to\": \"12362320246\",\n \"body\": \"Hey, can you call me back?\",\n \"operator_id\": \"310010\",\n \"received_at\": \"2026-05-18T15:04:01.135Z\",\n \"type\": \"mo_text\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Webhook received",
"messageId": "01K608PQBF3H41EQS64AH7CE11"
}{
"error": "Webhook processing failed"
}Body
application/json
Sinch-assigned inbound message id; echoed back in the ack for log correlation.
Sender phone number (Sinch may omit the +; the handler normalizes to E.164).
Tether-provisioned recipient number that received the SMS.
SMS text content as delivered by the carrier.
Sinch carrier/operator identifier for the originating network.
ISO-8601 timestamp at which Sinch ingested the message.
Sinch event type, e.g. mo_text for an inbound text message.
⌘I