Retrieve detailed information about a specific phone number configuration
curl --request GET \
--url https://api.example.com/v1/phone-numbers/{phone_number_id}import requests
url = "https://api.example.com/v1/phone-numbers/{phone_number_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/phone-numbers/{phone_number_id}', 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.example.com/v1/phone-numbers/{phone_number_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/phone-numbers/{phone_number_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/phone-numbers/{phone_number_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/phone-numbers/{phone_number_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"phone_number": "<string>",
"_id": "<string>",
"provider": "sip",
"friendly_name": "<string>",
"sip_termination_uri": "<string>",
"sip_trunk_username": "<string>",
"sip_trunk_password": "<string>",
"inbound_agent_id": "<string>",
"outbound_agent_id": "<string>",
"sip_infra_region": "global"
}{
"error": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>"
}Phone Numbers
Retrieve detailed information about a specific phone number configuration
Retrieve detailed information about a specific phone number configuration. The response includes:
- Phone number details and type (Import Phone Number or PIA-managed)
- Associated AI agent information if the number is linked
- SIP trunk configuration for Import Phone Numbers
- Routing rules and dispatch configurations
GET
/
v1
/
phone-numbers
/
{phone_number_id}
Retrieve detailed information about a specific phone number configuration
curl --request GET \
--url https://api.example.com/v1/phone-numbers/{phone_number_id}import requests
url = "https://api.example.com/v1/phone-numbers/{phone_number_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/phone-numbers/{phone_number_id}', 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.example.com/v1/phone-numbers/{phone_number_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/phone-numbers/{phone_number_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/phone-numbers/{phone_number_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/phone-numbers/{phone_number_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"phone_number": "<string>",
"_id": "<string>",
"provider": "sip",
"friendly_name": "<string>",
"sip_termination_uri": "<string>",
"sip_trunk_username": "<string>",
"sip_trunk_password": "<string>",
"inbound_agent_id": "<string>",
"outbound_agent_id": "<string>",
"sip_infra_region": "global"
}{
"error": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>"
}Path Parameters
Response
Successful Response
- GetSIPPhoneNumberResponse
- GetPiaPhoneNumberResponse
- GetTwilioPhoneNumberResponse
The phone number in E.164 format, including country code (e.g., +14155552671)
Unique identifier for this phone number record
Indicates this is an Import Phone Number (SIP provider)
Allowed value:
"sip"A human-readable label for this phone number
The SIP URI where calls are terminated
Username for SIP trunk authentication
Password for SIP trunk authentication
ID of the AI agent handling incoming calls
ID of the AI agent used for outbound calls
The infrastructure region for SIP routing: 'global' or 'bd' (Bangladesh)
Available options:
global, bd, bd_link3 
