Handle Sinch MMS delivery receipt
curl --request POST \
--url https://your-instance.example.com/api/webhook/sinch/mms-delivery-receipt \
--header 'Content-Type: application/json' \
--data '
{
"origin": "MMS_MT",
"code": "N102",
"message_id": "01K608PMMS001H41EQS64AH7CE",
"status": "Delivered",
"to": "14165550100"
}
'import requests
url = "https://your-instance.example.com/api/webhook/sinch/mms-delivery-receipt"
payload = {
"origin": "MMS_MT",
"code": "N102",
"message_id": "01K608PMMS001H41EQS64AH7CE",
"status": "Delivered",
"to": "14165550100"
}
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({
origin: 'MMS_MT',
code: 'N102',
message_id: '01K608PMMS001H41EQS64AH7CE',
status: 'Delivered',
to: '14165550100'
})
};
fetch('https://your-instance.example.com/api/webhook/sinch/mms-delivery-receipt', 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/sinch/mms-delivery-receipt",
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([
'origin' => 'MMS_MT',
'code' => 'N102',
'message_id' => '01K608PMMS001H41EQS64AH7CE',
'status' => 'Delivered',
'to' => '14165550100'
]),
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/sinch/mms-delivery-receipt"
payload := strings.NewReader("{\n \"origin\": \"MMS_MT\",\n \"code\": \"N102\",\n \"message_id\": \"01K608PMMS001H41EQS64AH7CE\",\n \"status\": \"Delivered\",\n \"to\": \"14165550100\"\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/sinch/mms-delivery-receipt")
.header("Content-Type", "application/json")
.body("{\n \"origin\": \"MMS_MT\",\n \"code\": \"N102\",\n \"message_id\": \"01K608PMMS001H41EQS64AH7CE\",\n \"status\": \"Delivered\",\n \"to\": \"14165550100\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/webhook/sinch/mms-delivery-receipt")
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 \"origin\": \"MMS_MT\",\n \"code\": \"N102\",\n \"message_id\": \"01K608PMMS001H41EQS64AH7CE\",\n \"status\": \"Delivered\",\n \"to\": \"14165550100\"\n}"
response = http.request(request)
puts response.read_body{
"message": "MMS delivery receipt received",
"mmsId": "01K608PMMS001H41EQS64AH7CE",
"code": "N102"
}{
"error": "Webhook processing failed"
}Webhooks
Handle Sinch MMS delivery receipt
Status callback posted by the Sinch MMS JSON API for outbound MMS batches. Handles N101 (Sent), N102 (Delivered), N103 (Expired), E101 (Sending Failure), and E102 (Delivery Failure) codes by updating the Message and emitting a socket event to the org.
POST
/
api
/
webhook
/
sinch
/
mms-delivery-receipt
Handle Sinch MMS delivery receipt
curl --request POST \
--url https://your-instance.example.com/api/webhook/sinch/mms-delivery-receipt \
--header 'Content-Type: application/json' \
--data '
{
"origin": "MMS_MT",
"code": "N102",
"message_id": "01K608PMMS001H41EQS64AH7CE",
"status": "Delivered",
"to": "14165550100"
}
'import requests
url = "https://your-instance.example.com/api/webhook/sinch/mms-delivery-receipt"
payload = {
"origin": "MMS_MT",
"code": "N102",
"message_id": "01K608PMMS001H41EQS64AH7CE",
"status": "Delivered",
"to": "14165550100"
}
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({
origin: 'MMS_MT',
code: 'N102',
message_id: '01K608PMMS001H41EQS64AH7CE',
status: 'Delivered',
to: '14165550100'
})
};
fetch('https://your-instance.example.com/api/webhook/sinch/mms-delivery-receipt', 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/sinch/mms-delivery-receipt",
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([
'origin' => 'MMS_MT',
'code' => 'N102',
'message_id' => '01K608PMMS001H41EQS64AH7CE',
'status' => 'Delivered',
'to' => '14165550100'
]),
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/sinch/mms-delivery-receipt"
payload := strings.NewReader("{\n \"origin\": \"MMS_MT\",\n \"code\": \"N102\",\n \"message_id\": \"01K608PMMS001H41EQS64AH7CE\",\n \"status\": \"Delivered\",\n \"to\": \"14165550100\"\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/sinch/mms-delivery-receipt")
.header("Content-Type", "application/json")
.body("{\n \"origin\": \"MMS_MT\",\n \"code\": \"N102\",\n \"message_id\": \"01K608PMMS001H41EQS64AH7CE\",\n \"status\": \"Delivered\",\n \"to\": \"14165550100\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/webhook/sinch/mms-delivery-receipt")
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 \"origin\": \"MMS_MT\",\n \"code\": \"N102\",\n \"message_id\": \"01K608PMMS001H41EQS64AH7CE\",\n \"status\": \"Delivered\",\n \"to\": \"14165550100\"\n}"
response = http.request(request)
puts response.read_body{
"message": "MMS delivery receipt received",
"mmsId": "01K608PMMS001H41EQS64AH7CE",
"code": "N102"
}{
"error": "Webhook processing failed"
}Body
application/json
Sinch traffic direction marker — MMS_MT for outbound (mobile-terminated) delivery receipts.
Sinch MMS status code: N101 sent, N102 delivered, N103 expired, E101 sending failure, E102 delivery failure.
Sinch MMS id returned when the outbound message was submitted; used to locate the matching Message.
Human-readable status label corresponding to code (e.g. Delivered, Failed).
Recipient phone number this receipt is for.