Typescript (SDK)
import { SyllableSDK } from "syllable-sdk";
const syllableSDK = new SyllableSDK({
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});
async function run() {
const result = await syllableSDK.channels.twilio.numbers.channelsTwilioNumbersA2pComplianceCheck({
channelId: 661482,
a2pMessagingPathCheckRequest: {
phone: "+18042221111",
},
});
console.log(result);
}
run();import os
from syllable_sdk import SyllableSDK
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.channels.twilio.numbers.channels_twilio_numbers_a2p_compliance_check(channel_id=661482, a2p_messaging_path_check_request={
"phone": "+18042221111",
})
# Handle response
print(res)curl --request POST \
--url https://api.syllable.cloud/api/v1/channels/twilio/{channel_id}/numbers/verify-a2p-compliance \
--header 'Content-Type: application/json' \
--header 'Syllable-API-Key: <api-key>' \
--data '
{
"phone": "<string>"
}
'const options = {
method: 'POST',
headers: {'Syllable-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({phone: '<string>'})
};
fetch('https://api.syllable.cloud/api/v1/channels/twilio/{channel_id}/numbers/verify-a2p-compliance', 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://api.syllable.cloud/api/v1/channels/twilio/{channel_id}/numbers/verify-a2p-compliance",
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([
'phone' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Syllable-API-Key: <api-key>"
],
]);
$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://api.syllable.cloud/api/v1/channels/twilio/{channel_id}/numbers/verify-a2p-compliance"
payload := strings.NewReader("{\n \"phone\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Syllable-API-Key", "<api-key>")
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://api.syllable.cloud/api/v1/channels/twilio/{channel_id}/numbers/verify-a2p-compliance")
.header("Syllable-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syllable.cloud/api/v1/channels/twilio/{channel_id}/numbers/verify-a2p-compliance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Syllable-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"a2p_approved": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}channels.twilio.numbers
Verify Twilio Us A2P Compliance
Return whether Twilio shows this number on a US A2P messaging path with an approved brand.
POST
/
api
/
v1
/
channels
/
twilio
/
{channel_id}
/
numbers
/
verify-a2p-compliance
Typescript (SDK)
import { SyllableSDK } from "syllable-sdk";
const syllableSDK = new SyllableSDK({
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});
async function run() {
const result = await syllableSDK.channels.twilio.numbers.channelsTwilioNumbersA2pComplianceCheck({
channelId: 661482,
a2pMessagingPathCheckRequest: {
phone: "+18042221111",
},
});
console.log(result);
}
run();import os
from syllable_sdk import SyllableSDK
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.channels.twilio.numbers.channels_twilio_numbers_a2p_compliance_check(channel_id=661482, a2p_messaging_path_check_request={
"phone": "+18042221111",
})
# Handle response
print(res)curl --request POST \
--url https://api.syllable.cloud/api/v1/channels/twilio/{channel_id}/numbers/verify-a2p-compliance \
--header 'Content-Type: application/json' \
--header 'Syllable-API-Key: <api-key>' \
--data '
{
"phone": "<string>"
}
'const options = {
method: 'POST',
headers: {'Syllable-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({phone: '<string>'})
};
fetch('https://api.syllable.cloud/api/v1/channels/twilio/{channel_id}/numbers/verify-a2p-compliance', 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://api.syllable.cloud/api/v1/channels/twilio/{channel_id}/numbers/verify-a2p-compliance",
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([
'phone' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Syllable-API-Key: <api-key>"
],
]);
$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://api.syllable.cloud/api/v1/channels/twilio/{channel_id}/numbers/verify-a2p-compliance"
payload := strings.NewReader("{\n \"phone\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Syllable-API-Key", "<api-key>")
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://api.syllable.cloud/api/v1/channels/twilio/{channel_id}/numbers/verify-a2p-compliance")
.header("Syllable-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syllable.cloud/api/v1/channels/twilio/{channel_id}/numbers/verify-a2p-compliance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Syllable-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"a2p_approved": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Body
application/json
Body to check US A2P / Messaging Service setup for one number on the Twilio channel.
E.164 phone number exactly as Twilio stores it for this incoming number.
Example:
"+18042221111"
Response
Successful Response
Twilio-side A2P setup state for the number.
Reflects Twilio configuration (Messaging Service + Brand + Campaign records); it is not carrier per-number REGISTERED state or legal/content compliance.
True when the number is on a Messaging Service with a US A2P registration whose brand is approved and campaign is verified on the same registration.
⌘I

