curl --request POST \
--url https://www.closient.com/notifications/api/v1/sms/webhooks/telnyx/ \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"event_type": "<string>",
"payload": {
"id": "<string>",
"from": {
"phone_number": "<string>"
},
"to": [
{
"phone_number": "<string>",
"status": ""
}
],
"text": ""
}
}
}
'import requests
url = "https://www.closient.com/notifications/api/v1/sms/webhooks/telnyx/"
payload = { "data": {
"event_type": "<string>",
"payload": {
"id": "<string>",
"from": { "phone_number": "<string>" },
"to": [
{
"phone_number": "<string>",
"status": ""
}
],
"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({
data: {
event_type: '<string>',
payload: {
id: '<string>',
from: {phone_number: '<string>'},
to: [{phone_number: '<string>', status: ''}],
text: ''
}
}
})
};
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' => '<string>',
'payload' => [
'id' => '<string>',
'from' => [
'phone_number' => '<string>'
],
'to' => [
[
'phone_number' => '<string>',
'status' => ''
]
],
'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://www.closient.com/notifications/api/v1/sms/webhooks/telnyx/"
payload := strings.NewReader("{\n \"data\": {\n \"event_type\": \"<string>\",\n \"payload\": {\n \"id\": \"<string>\",\n \"from\": {\n \"phone_number\": \"<string>\"\n },\n \"to\": [\n {\n \"phone_number\": \"<string>\",\n \"status\": \"\"\n }\n ],\n \"text\": \"\"\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\": \"<string>\",\n \"payload\": {\n \"id\": \"<string>\",\n \"from\": {\n \"phone_number\": \"<string>\"\n },\n \"to\": [\n {\n \"phone_number\": \"<string>\",\n \"status\": \"\"\n }\n ],\n \"text\": \"\"\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\": \"<string>\",\n \"payload\": {\n \"id\": \"<string>\",\n \"from\": {\n \"phone_number\": \"<string>\"\n },\n \"to\": [\n {\n \"phone_number\": \"<string>\",\n \"status\": \"\"\n }\n ],\n \"text\": \"\"\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>"
}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": "<string>",
"payload": {
"id": "<string>",
"from": {
"phone_number": "<string>"
},
"to": [
{
"phone_number": "<string>",
"status": ""
}
],
"text": ""
}
}
}
'import requests
url = "https://www.closient.com/notifications/api/v1/sms/webhooks/telnyx/"
payload = { "data": {
"event_type": "<string>",
"payload": {
"id": "<string>",
"from": { "phone_number": "<string>" },
"to": [
{
"phone_number": "<string>",
"status": ""
}
],
"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({
data: {
event_type: '<string>',
payload: {
id: '<string>',
from: {phone_number: '<string>'},
to: [{phone_number: '<string>', status: ''}],
text: ''
}
}
})
};
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' => '<string>',
'payload' => [
'id' => '<string>',
'from' => [
'phone_number' => '<string>'
],
'to' => [
[
'phone_number' => '<string>',
'status' => ''
]
],
'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://www.closient.com/notifications/api/v1/sms/webhooks/telnyx/"
payload := strings.NewReader("{\n \"data\": {\n \"event_type\": \"<string>\",\n \"payload\": {\n \"id\": \"<string>\",\n \"from\": {\n \"phone_number\": \"<string>\"\n },\n \"to\": [\n {\n \"phone_number\": \"<string>\",\n \"status\": \"\"\n }\n ],\n \"text\": \"\"\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\": \"<string>\",\n \"payload\": {\n \"id\": \"<string>\",\n \"from\": {\n \"phone_number\": \"<string>\"\n },\n \"to\": [\n {\n \"phone_number\": \"<string>\",\n \"status\": \"\"\n }\n ],\n \"text\": \"\"\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\": \"<string>\",\n \"payload\": {\n \"id\": \"<string>\",\n \"from\": {\n \"phone_number\": \"<string>\"\n },\n \"to\": [\n {\n \"phone_number\": \"<string>\",\n \"status\": \"\"\n }\n ],\n \"text\": \"\"\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
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" }]
}
}