Carrier delivery-receipt (DLR) callback
curl --request POST \
--url https://www.closient.com/notifications/api/v1/sms/webhooks/status/ \
--header 'Content-Type: application/json' \
--data '
{
"message_id": "",
"status": "",
"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/status/"
payload = {
"message_id": "",
"status": "",
"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({
message_id: '',
status: '',
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/status/', 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/status/",
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([
'message_id' => '',
'status' => '',
'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/status/"
payload := strings.NewReader("{\n \"message_id\": \"\",\n \"status\": \"\",\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/status/")
.header("Content-Type", "application/json")
.body("{\n \"message_id\": \"\",\n \"status\": \"\",\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/status/")
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 \"message_id\": \"\",\n \"status\": \"\",\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>"
}SMS Webhooks
Carrier delivery-receipt (DLR) callback
Unauthenticated carrier delivery-receipt callback. Verifies the signature against the raw body BEFORE parsing (401 on failure), then updates the matching SMSMessage delivery status.
POST
/
notifications
/
api
/
v1
/
sms
/
webhooks
/
status
/
Carrier delivery-receipt (DLR) callback
curl --request POST \
--url https://www.closient.com/notifications/api/v1/sms/webhooks/status/ \
--header 'Content-Type: application/json' \
--data '
{
"message_id": "",
"status": "",
"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/status/"
payload = {
"message_id": "",
"status": "",
"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({
message_id: '',
status: '',
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/status/', 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/status/",
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([
'message_id' => '',
'status' => '',
'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/status/"
payload := strings.NewReader("{\n \"message_id\": \"\",\n \"status\": \"\",\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/status/")
.header("Content-Type", "application/json")
.body("{\n \"message_id\": \"\",\n \"status\": \"\",\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/status/")
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 \"message_id\": \"\",\n \"status\": \"\",\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
application/json
Delivery receipt (DLR) payload from a carrier status callback (Flowroute, voip.ms, or Telnyx).
Carrier-assigned message id matching SMSMessage.provider_message_id. Flowroute/voip.ms only.
Carrier delivery status (e.g. delivered, failed, undelivered). Flowroute/voip.ms only.
Telnyx webhook envelope. Present only for Telnyx-sourced requests, in which case message_id/status are empty.
Show child attributes
Show child attributes
Example:
{
"event_type": "message.received",
"payload": {
"from": { "phone_number": "+15035550199" },
"id": "84cca175-9755-4859-b67f-4730d7f58aa3",
"text": "STOP",
"to": [{ "phone_number": "+18445551234" }]
}
}
⌘I