curl --request POST \
--url https://www.closient.com/notifications/api/v1/sms/webhooks/telnyx/ \
--header 'Content-Type: application/json' \
--data '
{
"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/telnyx/"
payload = { "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({
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/telnyx/', 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/telnyx/",
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([
'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/telnyx/"
payload := strings.NewReader("{\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/telnyx/")
.header("Content-Type", "application/json")
.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/telnyx/")
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 \"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{
"action": "stop",
"ok": true
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}Unified Telnyx webhook (inbound + delivery-receipt)
Single webhook URL for the Telnyx messaging profile (C-4127) — Telnyx posts both inbound messages and delivery receipts to one configured URL, unlike Flowroute/voip.ms which are split across /inbound/ and /status/. Dispatches on data.event_type: message.received handles inbound STOP/HELP/START; any other event type (e.g. message.finalized) is treated as a delivery-status update. Verifies the Telnyx Ed25519 signature against the raw body BEFORE parsing; invalid/missing signature returns 401.
curl --request POST \
--url https://www.closient.com/notifications/api/v1/sms/webhooks/telnyx/ \
--header 'Content-Type: application/json' \
--data '
{
"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/telnyx/"
payload = { "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({
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/telnyx/', 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/telnyx/",
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([
'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/telnyx/"
payload := strings.NewReader("{\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/telnyx/")
.header("Content-Type", "application/json")
.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/telnyx/")
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 \"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{
"action": "stop",
"ok": true
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}Body
Unified Telnyx webhook envelope (C-4127).
A Telnyx messaging profile has exactly ONE configurable webhook URL and
posts every event type — inbound messages AND delivery receipts — to it.
That's unlike Flowroute/voip.ms, which are split across /inbound/ and
/status/ above (that split was built Flowroute-first). This schema/
endpoint is Telnyx-only; Flowroute and voip.ms keep using the split
endpoints unchanged.
Telnyx webhook envelope.
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" }]
}
}
Response
OK
Small acknowledgement returned to the carrier after processing.