curl --request POST \
--url https://api.peachdeskai.com/api/v1/organizations/telephony-config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ari_endpoint": "<string>",
"app_name": "<string>",
"app_password": "<string>",
"provider": "ari",
"ws_client_name": "",
"trunk_endpoint": "",
"outbound_number_format": "as_dialed",
"trunk_country_code": "",
"from_numbers": [
"<string>"
]
}
'import requests
url = "https://api.peachdeskai.com/api/v1/organizations/telephony-config"
payload = {
"ari_endpoint": "<string>",
"app_name": "<string>",
"app_password": "<string>",
"provider": "ari",
"ws_client_name": "",
"trunk_endpoint": "",
"outbound_number_format": "as_dialed",
"trunk_country_code": "",
"from_numbers": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ari_endpoint: '<string>',
app_name: '<string>',
app_password: '<string>',
provider: 'ari',
ws_client_name: '',
trunk_endpoint: '',
outbound_number_format: 'as_dialed',
trunk_country_code: '',
from_numbers: ['<string>']
})
};
fetch('https://api.peachdeskai.com/api/v1/organizations/telephony-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.peachdeskai.com/api/v1/organizations/telephony-config",
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([
'ari_endpoint' => '<string>',
'app_name' => '<string>',
'app_password' => '<string>',
'provider' => 'ari',
'ws_client_name' => '',
'trunk_endpoint' => '',
'outbound_number_format' => 'as_dialed',
'trunk_country_code' => '',
'from_numbers' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.peachdeskai.com/api/v1/organizations/telephony-config"
payload := strings.NewReader("{\n \"ari_endpoint\": \"<string>\",\n \"app_name\": \"<string>\",\n \"app_password\": \"<string>\",\n \"provider\": \"ari\",\n \"ws_client_name\": \"\",\n \"trunk_endpoint\": \"\",\n \"outbound_number_format\": \"as_dialed\",\n \"trunk_country_code\": \"\",\n \"from_numbers\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.peachdeskai.com/api/v1/organizations/telephony-config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ari_endpoint\": \"<string>\",\n \"app_name\": \"<string>\",\n \"app_password\": \"<string>\",\n \"provider\": \"ari\",\n \"ws_client_name\": \"\",\n \"trunk_endpoint\": \"\",\n \"outbound_number_format\": \"as_dialed\",\n \"trunk_country_code\": \"\",\n \"from_numbers\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peachdeskai.com/api/v1/organizations/telephony-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ari_endpoint\": \"<string>\",\n \"app_name\": \"<string>\",\n \"app_password\": \"<string>\",\n \"provider\": \"ari\",\n \"ws_client_name\": \"\",\n \"trunk_endpoint\": \"\",\n \"outbound_number_format\": \"as_dialed\",\n \"trunk_country_code\": \"\",\n \"from_numbers\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Save Telephony Configuration
Legacy: upserts the orgтАЩs default config (and its phone numbers) in the original payload shape so existing UI clients keep working. Prefer the multi-config + phone-number endpoints for new clients.
curl --request POST \
--url https://api.peachdeskai.com/api/v1/organizations/telephony-config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ari_endpoint": "<string>",
"app_name": "<string>",
"app_password": "<string>",
"provider": "ari",
"ws_client_name": "",
"trunk_endpoint": "",
"outbound_number_format": "as_dialed",
"trunk_country_code": "",
"from_numbers": [
"<string>"
]
}
'import requests
url = "https://api.peachdeskai.com/api/v1/organizations/telephony-config"
payload = {
"ari_endpoint": "<string>",
"app_name": "<string>",
"app_password": "<string>",
"provider": "ari",
"ws_client_name": "",
"trunk_endpoint": "",
"outbound_number_format": "as_dialed",
"trunk_country_code": "",
"from_numbers": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ari_endpoint: '<string>',
app_name: '<string>',
app_password: '<string>',
provider: 'ari',
ws_client_name: '',
trunk_endpoint: '',
outbound_number_format: 'as_dialed',
trunk_country_code: '',
from_numbers: ['<string>']
})
};
fetch('https://api.peachdeskai.com/api/v1/organizations/telephony-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.peachdeskai.com/api/v1/organizations/telephony-config",
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([
'ari_endpoint' => '<string>',
'app_name' => '<string>',
'app_password' => '<string>',
'provider' => 'ari',
'ws_client_name' => '',
'trunk_endpoint' => '',
'outbound_number_format' => 'as_dialed',
'trunk_country_code' => '',
'from_numbers' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.peachdeskai.com/api/v1/organizations/telephony-config"
payload := strings.NewReader("{\n \"ari_endpoint\": \"<string>\",\n \"app_name\": \"<string>\",\n \"app_password\": \"<string>\",\n \"provider\": \"ari\",\n \"ws_client_name\": \"\",\n \"trunk_endpoint\": \"\",\n \"outbound_number_format\": \"as_dialed\",\n \"trunk_country_code\": \"\",\n \"from_numbers\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.peachdeskai.com/api/v1/organizations/telephony-config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ari_endpoint\": \"<string>\",\n \"app_name\": \"<string>\",\n \"app_password\": \"<string>\",\n \"provider\": \"ari\",\n \"ws_client_name\": \"\",\n \"trunk_endpoint\": \"\",\n \"outbound_number_format\": \"as_dialed\",\n \"trunk_country_code\": \"\",\n \"from_numbers\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peachdeskai.com/api/v1/organizations/telephony-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ari_endpoint\": \"<string>\",\n \"app_name\": \"<string>\",\n \"app_password\": \"<string>\",\n \"provider\": \"ari\",\n \"ws_client_name\": \"\",\n \"trunk_endpoint\": \"\",\n \"outbound_number_format\": \"as_dialed\",\n \"trunk_country_code\": \"\",\n \"from_numbers\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Interactive user session: the login JWT, sent as Authorization: Bearer <token>.
Body
- ARIConfigurationRequest
- CloudonixConfigurationRequest
- PlivoConfigurationRequest
- TelnyxConfigurationRequest
- TwilioConfigurationRequest
- VobizConfigurationRequest
- VonageConfigurationRequest
Request schema for Asterisk ARI configuration.
ARI base URL (e.g., http://asterisk.example.com:8088)
Stasis application name registered in Asterisk
ARI user password
"ari"websocket_client.conf connection name for externalMedia (e.g., peachdesk_staging)
PJSIP endpoint name of the SIP trunk to route outbound calls through (e.g. bridgei2p). Leave empty to dial endpoints registered on the same Asterisk.
Digit format the trunk expects on outbound: as_dialed (send the number unchanged), e164 (+919876543210), strip_plus (919876543210), national (9876543210), national_zero (09876543210).
as_dialed, e164, strip_plus, national, national_zero ISO-2 country of the trunk (e.g. IN). Required only by the national and national_zero formats, which strip this country's dial code.
List of SIP extensions/numbers for outbound calls (optional)
Response
Successful Response

