Get Phone Number Configuration
curl --request GET \
--url https://api.trillet.ai/v1/api/twilio/phone-numbers/{phoneNumberId}/config \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api.trillet.ai/v1/api/twilio/phone-numbers/{phoneNumberId}/config"
headers = {
"x-api-key": "<api-key>",
"x-workspace-id": "<x-workspace-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-workspace-id': '<x-workspace-id>'}
};
fetch('https://api.trillet.ai/v1/api/twilio/phone-numbers/{phoneNumberId}/config', 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.trillet.ai/v1/api/twilio/phone-numbers/{phoneNumberId}/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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.trillet.ai/v1/api/twilio/phone-numbers/{phoneNumberId}/config"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
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.trillet.ai/v1/api/twilio/phone-numbers/{phoneNumberId}/config")
.header("x-api-key", "<api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trillet.ai/v1/api/twilio/phone-numbers/{phoneNumberId}/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
response = http.request(request)
puts response.read_body{
"phoneNumberId": "665a1b2c3d4e5f6a7b8c9d0e",
"agentId": "665a1b2c3d4e5f6a7b8c9d0f",
"flowType": "call",
"direction": "bidirectional",
"status": "active",
"recording": true,
"officeHours": {
"enabled": false
},
"transferCallerIdMode": "agent",
"metadataTags": ["sales", "priority"]
}
Get Phone Number Configuration
Retrieve the call flow and message flow configuration for a phone number.
GET
/
v1
/
api
/
twilio
/
phone-numbers
/
{phoneNumberId}
/
config
Get Phone Number Configuration
curl --request GET \
--url https://api.trillet.ai/v1/api/twilio/phone-numbers/{phoneNumberId}/config \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api.trillet.ai/v1/api/twilio/phone-numbers/{phoneNumberId}/config"
headers = {
"x-api-key": "<api-key>",
"x-workspace-id": "<x-workspace-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-workspace-id': '<x-workspace-id>'}
};
fetch('https://api.trillet.ai/v1/api/twilio/phone-numbers/{phoneNumberId}/config', 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.trillet.ai/v1/api/twilio/phone-numbers/{phoneNumberId}/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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.trillet.ai/v1/api/twilio/phone-numbers/{phoneNumberId}/config"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
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.trillet.ai/v1/api/twilio/phone-numbers/{phoneNumberId}/config")
.header("x-api-key", "<api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trillet.ai/v1/api/twilio/phone-numbers/{phoneNumberId}/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
response = http.request(request)
puts response.read_body{
"phoneNumberId": "665a1b2c3d4e5f6a7b8c9d0e",
"agentId": "665a1b2c3d4e5f6a7b8c9d0f",
"flowType": "call",
"direction": "bidirectional",
"status": "active",
"recording": true,
"officeHours": {
"enabled": false
},
"transferCallerIdMode": "agent",
"metadataTags": ["sales", "priority"]
}
Headers
string
required
API key used for authenticating requests to the API.
string
required
Workspace identifier for the API.
Path Parameters
string
required
The unique identifier of the phone number.
Response Fields
string
The phone number ID.
string
The call agent assigned to this phone number.
string
Type of flow assigned (“call” or “message”).
string
Call direction configuration (“inbound”, “outbound”, “bidirectional”).
string
Configuration status.
boolean
Whether call recording is enabled.
object
Office hours configuration for the phone number.
string
Caller ID mode for call transfers.
array
Array of metadata tags assigned to this phone number.
{
"phoneNumberId": "665a1b2c3d4e5f6a7b8c9d0e",
"agentId": "665a1b2c3d4e5f6a7b8c9d0f",
"flowType": "call",
"direction": "bidirectional",
"status": "active",
"recording": true,
"officeHours": {
"enabled": false
},
"transferCallerIdMode": "agent",
"metadataTags": ["sales", "priority"]
}
⌘I
