curl --request POST \
--url https://www.closient.com/notifications/api/v1/sms/webhooks/inbound/ \
--header 'Content-Type: application/json' \
--data '
{
"to": "",
"from": "",
"body": "",
"data": {
"event_type": "message.received",
"payload": {
"from": {
"phone_number": "+15035550199"
},
"id": "84cca175-9755-4859-b67f-4730d7f58aa3",
"text": "STOP",
"to": [
{
"phone_number": "+18445551234"
}
]
}
}
}
'import requests
url = "https://www.closient.com/notifications/api/v1/sms/webhooks/inbound/"
payload = {
"to": "",
"from": "",
"body": "",
"data": {
"event_type": "message.received",
"payload": {
"from": { "phone_number": "+15035550199" },
"id": "84cca175-9755-4859-b67f-4730d7f58aa3",
"text": "STOP",
"to": [{ "phone_number": "+18445551234" }]
}
}
}
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({
to: '',
from: '',
body: JSON.stringify(''),
data: {
event_type: 'message.received',
payload: {
from: {phone_number: '+15035550199'},
id: '84cca175-9755-4859-b67f-4730d7f58aa3',
text: 'STOP',
to: [{phone_number: '+18445551234'}]
}
}
})
};
fetch('https://www.closient.com/notifications/api/v1/sms/webhooks/inbound/', 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://www.closient.com/notifications/api/v1/sms/webhooks/inbound/",
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([
'to' => '',
'from' => '',
'body' => '',
'data' => [
'event_type' => 'message.received',
'payload' => [
'from' => [
'phone_number' => '+15035550199'
],
'id' => '84cca175-9755-4859-b67f-4730d7f58aa3',
'text' => 'STOP',
'to' => [
[
'phone_number' => '+18445551234'
]
]
]
]
]),
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://www.closient.com/notifications/api/v1/sms/webhooks/inbound/"
payload := strings.NewReader("{\n \"to\": \"\",\n \"from\": \"\",\n \"body\": \"\",\n \"data\": {\n \"event_type\": \"message.received\",\n \"payload\": {\n \"from\": {\n \"phone_number\": \"+15035550199\"\n },\n \"id\": \"84cca175-9755-4859-b67f-4730d7f58aa3\",\n \"text\": \"STOP\",\n \"to\": [\n {\n \"phone_number\": \"+18445551234\"\n }\n ]\n }\n }\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://www.closient.com/notifications/api/v1/sms/webhooks/inbound/")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"\",\n \"from\": \"\",\n \"body\": \"\",\n \"data\": {\n \"event_type\": \"message.received\",\n \"payload\": {\n \"from\": {\n \"phone_number\": \"+15035550199\"\n },\n \"id\": \"84cca175-9755-4859-b67f-4730d7f58aa3\",\n \"text\": \"STOP\",\n \"to\": [\n {\n \"phone_number\": \"+18445551234\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/notifications/api/v1/sms/webhooks/inbound/")
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 \"to\": \"\",\n \"from\": \"\",\n \"body\": \"\",\n \"data\": {\n \"event_type\": \"message.received\",\n \"payload\": {\n \"from\": {\n \"phone_number\": \"+15035550199\"\n },\n \"id\": \"84cca175-9755-4859-b67f-4730d7f58aa3\",\n \"text\": \"STOP\",\n \"to\": [\n {\n \"phone_number\": \"+18445551234\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"action": ""
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error_code": "<string>",
"timestamp": "<string>",
"retryable": false,
"retry_after": 123,
"owner_action_required": true,
"details": "<unknown>"
}Carrier inbound-SMS callback
Unauthenticated carrier callback for inbound SMS on the 844/833 lines. Verifies a Flowroute HMAC (or voip.ms shared-secret) against the raw body BEFORE parsing; invalid/missing signature returns 401. Handles STOP/HELP/START keywords and records the inbound message.
curl --request POST \
--url https://www.closient.com/notifications/api/v1/sms/webhooks/inbound/ \
--header 'Content-Type: application/json' \
--data '
{
"to": "",
"from": "",
"body": "",
"data": {
"event_type": "message.received",
"payload": {
"from": {
"phone_number": "+15035550199"
},
"id": "84cca175-9755-4859-b67f-4730d7f58aa3",
"text": "STOP",
"to": [
{
"phone_number": "+18445551234"
}
]
}
}
}
'import requests
url = "https://www.closient.com/notifications/api/v1/sms/webhooks/inbound/"
payload = {
"to": "",
"from": "",
"body": "",
"data": {
"event_type": "message.received",
"payload": {
"from": { "phone_number": "+15035550199" },
"id": "84cca175-9755-4859-b67f-4730d7f58aa3",
"text": "STOP",
"to": [{ "phone_number": "+18445551234" }]
}
}
}
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({
to: '',
from: '',
body: JSON.stringify(''),
data: {
event_type: 'message.received',
payload: {
from: {phone_number: '+15035550199'},
id: '84cca175-9755-4859-b67f-4730d7f58aa3',
text: 'STOP',
to: [{phone_number: '+18445551234'}]
}
}
})
};
fetch('https://www.closient.com/notifications/api/v1/sms/webhooks/inbound/', 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://www.closient.com/notifications/api/v1/sms/webhooks/inbound/",
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([
'to' => '',
'from' => '',
'body' => '',
'data' => [
'event_type' => 'message.received',
'payload' => [
'from' => [
'phone_number' => '+15035550199'
],
'id' => '84cca175-9755-4859-b67f-4730d7f58aa3',
'text' => 'STOP',
'to' => [
[
'phone_number' => '+18445551234'
]
]
]
]
]),
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://www.closient.com/notifications/api/v1/sms/webhooks/inbound/"
payload := strings.NewReader("{\n \"to\": \"\",\n \"from\": \"\",\n \"body\": \"\",\n \"data\": {\n \"event_type\": \"message.received\",\n \"payload\": {\n \"from\": {\n \"phone_number\": \"+15035550199\"\n },\n \"id\": \"84cca175-9755-4859-b67f-4730d7f58aa3\",\n \"text\": \"STOP\",\n \"to\": [\n {\n \"phone_number\": \"+18445551234\"\n }\n ]\n }\n }\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://www.closient.com/notifications/api/v1/sms/webhooks/inbound/")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"\",\n \"from\": \"\",\n \"body\": \"\",\n \"data\": {\n \"event_type\": \"message.received\",\n \"payload\": {\n \"from\": {\n \"phone_number\": \"+15035550199\"\n },\n \"id\": \"84cca175-9755-4859-b67f-4730d7f58aa3\",\n \"text\": \"STOP\",\n \"to\": [\n {\n \"phone_number\": \"+18445551234\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/notifications/api/v1/sms/webhooks/inbound/")
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 \"to\": \"\",\n \"from\": \"\",\n \"body\": \"\",\n \"data\": {\n \"event_type\": \"message.received\",\n \"payload\": {\n \"from\": {\n \"phone_number\": \"+15035550199\"\n },\n \"id\": \"84cca175-9755-4859-b67f-4730d7f58aa3\",\n \"text\": \"STOP\",\n \"to\": [\n {\n \"phone_number\": \"+18445551234\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"action": ""
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error_code": "<string>",
"timestamp": "<string>",
"retryable": false,
"retry_after": 123,
"owner_action_required": true,
"details": "<unknown>"
}Body
Inbound SMS payload from a carrier callback (Flowroute, voip.ms, or Telnyx).
Carrier payloads differ; this schema captures both shapes. Flowroute and
voip.ms post a flat to/from/body JSON body (voip.ms's callback
URL is configured with those field names — see the voip.ms reference doc).
Telnyx posts a nested data.payload envelope instead, captured by the
optional data field. Exactly one shape must be present. Unknown extra
keys are ignored.
Destination number that received the inbound SMS (our 844 or 833 DID), E.164. Flowroute/voip.ms only.
The sender's phone number (the consumer), in E.164. Flowroute/voip.ms only.
The raw inbound message text. Classified for STOP/HELP/START keywords. Flowroute/voip.ms only.
Telnyx webhook envelope. Present only for Telnyx-sourced requests, in which case to/from/body are empty.
Show child attributes
Show child attributes
{
"event_type": "message.received",
"payload": {
"from": { "phone_number": "+15035550199" },
"id": "84cca175-9755-4859-b67f-4730d7f58aa3",
"text": "STOP",
"to": [{ "phone_number": "+18445551234" }]
}
}