Save organization-level Voice AI configuration (superadmin)
curl --request POST \
--url https://your-instance.example.com/api/calls/voice-ai/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"aiVoiceProvider": "elevenlabs",
"elevenlabsApiKey": "sk_eleven_xxxxxxxxxxxxxxxx",
"generateToolSecret": true,
"sinchEstProjectId": "sinch-est-project-abc",
"sinchEstTrunkId": "sinch-est-trunk-xyz",
"sinchEstTrunkDomain": "example.sip.sinch.com"
}
'import requests
url = "https://your-instance.example.com/api/calls/voice-ai/config"
payload = {
"aiVoiceProvider": "elevenlabs",
"elevenlabsApiKey": "sk_eleven_xxxxxxxxxxxxxxxx",
"generateToolSecret": True,
"sinchEstProjectId": "sinch-est-project-abc",
"sinchEstTrunkId": "sinch-est-trunk-xyz",
"sinchEstTrunkDomain": "example.sip.sinch.com"
}
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({
aiVoiceProvider: 'elevenlabs',
elevenlabsApiKey: 'sk_eleven_xxxxxxxxxxxxxxxx',
generateToolSecret: true,
sinchEstProjectId: 'sinch-est-project-abc',
sinchEstTrunkId: 'sinch-est-trunk-xyz',
sinchEstTrunkDomain: 'example.sip.sinch.com'
})
};
fetch('https://your-instance.example.com/api/calls/voice-ai/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://your-instance.example.com/api/calls/voice-ai/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([
'aiVoiceProvider' => 'elevenlabs',
'elevenlabsApiKey' => 'sk_eleven_xxxxxxxxxxxxxxxx',
'generateToolSecret' => true,
'sinchEstProjectId' => 'sinch-est-project-abc',
'sinchEstTrunkId' => 'sinch-est-trunk-xyz',
'sinchEstTrunkDomain' => 'example.sip.sinch.com'
]),
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://your-instance.example.com/api/calls/voice-ai/config"
payload := strings.NewReader("{\n \"aiVoiceProvider\": \"elevenlabs\",\n \"elevenlabsApiKey\": \"sk_eleven_xxxxxxxxxxxxxxxx\",\n \"generateToolSecret\": true,\n \"sinchEstProjectId\": \"sinch-est-project-abc\",\n \"sinchEstTrunkId\": \"sinch-est-trunk-xyz\",\n \"sinchEstTrunkDomain\": \"example.sip.sinch.com\"\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://your-instance.example.com/api/calls/voice-ai/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"aiVoiceProvider\": \"elevenlabs\",\n \"elevenlabsApiKey\": \"sk_eleven_xxxxxxxxxxxxxxxx\",\n \"generateToolSecret\": true,\n \"sinchEstProjectId\": \"sinch-est-project-abc\",\n \"sinchEstTrunkId\": \"sinch-est-trunk-xyz\",\n \"sinchEstTrunkDomain\": \"example.sip.sinch.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/calls/voice-ai/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 \"aiVoiceProvider\": \"elevenlabs\",\n \"elevenlabsApiKey\": \"sk_eleven_xxxxxxxxxxxxxxxx\",\n \"generateToolSecret\": true,\n \"sinchEstProjectId\": \"sinch-est-project-abc\",\n \"sinchEstTrunkId\": \"sinch-est-trunk-xyz\",\n \"sinchEstTrunkDomain\": \"example.sip.sinch.com\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Configuration saved"
}{
"success": false,
"error": "Call not found"
}{
"success": false,
"error": "Call not found"
}Calls
Save organization-level Voice AI configuration (superadmin)
Persists the AI voice provider selection, ElevenLabs API key, and Sinch EST credentials. Optionally generates a fresh ElevenLabs tool secret (32-byte hex). After save, attempts to auto-configure the ElevenLabs workspace post-call webhook and stores the returned HMAC webhookSecret. Webhook configuration failures are logged but don’t fail the save. Superadmin only.
POST
/
api
/
calls
/
voice-ai
/
config
Save organization-level Voice AI configuration (superadmin)
curl --request POST \
--url https://your-instance.example.com/api/calls/voice-ai/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"aiVoiceProvider": "elevenlabs",
"elevenlabsApiKey": "sk_eleven_xxxxxxxxxxxxxxxx",
"generateToolSecret": true,
"sinchEstProjectId": "sinch-est-project-abc",
"sinchEstTrunkId": "sinch-est-trunk-xyz",
"sinchEstTrunkDomain": "example.sip.sinch.com"
}
'import requests
url = "https://your-instance.example.com/api/calls/voice-ai/config"
payload = {
"aiVoiceProvider": "elevenlabs",
"elevenlabsApiKey": "sk_eleven_xxxxxxxxxxxxxxxx",
"generateToolSecret": True,
"sinchEstProjectId": "sinch-est-project-abc",
"sinchEstTrunkId": "sinch-est-trunk-xyz",
"sinchEstTrunkDomain": "example.sip.sinch.com"
}
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({
aiVoiceProvider: 'elevenlabs',
elevenlabsApiKey: 'sk_eleven_xxxxxxxxxxxxxxxx',
generateToolSecret: true,
sinchEstProjectId: 'sinch-est-project-abc',
sinchEstTrunkId: 'sinch-est-trunk-xyz',
sinchEstTrunkDomain: 'example.sip.sinch.com'
})
};
fetch('https://your-instance.example.com/api/calls/voice-ai/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://your-instance.example.com/api/calls/voice-ai/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([
'aiVoiceProvider' => 'elevenlabs',
'elevenlabsApiKey' => 'sk_eleven_xxxxxxxxxxxxxxxx',
'generateToolSecret' => true,
'sinchEstProjectId' => 'sinch-est-project-abc',
'sinchEstTrunkId' => 'sinch-est-trunk-xyz',
'sinchEstTrunkDomain' => 'example.sip.sinch.com'
]),
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://your-instance.example.com/api/calls/voice-ai/config"
payload := strings.NewReader("{\n \"aiVoiceProvider\": \"elevenlabs\",\n \"elevenlabsApiKey\": \"sk_eleven_xxxxxxxxxxxxxxxx\",\n \"generateToolSecret\": true,\n \"sinchEstProjectId\": \"sinch-est-project-abc\",\n \"sinchEstTrunkId\": \"sinch-est-trunk-xyz\",\n \"sinchEstTrunkDomain\": \"example.sip.sinch.com\"\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://your-instance.example.com/api/calls/voice-ai/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"aiVoiceProvider\": \"elevenlabs\",\n \"elevenlabsApiKey\": \"sk_eleven_xxxxxxxxxxxxxxxx\",\n \"generateToolSecret\": true,\n \"sinchEstProjectId\": \"sinch-est-project-abc\",\n \"sinchEstTrunkId\": \"sinch-est-trunk-xyz\",\n \"sinchEstTrunkDomain\": \"example.sip.sinch.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/calls/voice-ai/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 \"aiVoiceProvider\": \"elevenlabs\",\n \"elevenlabsApiKey\": \"sk_eleven_xxxxxxxxxxxxxxxx\",\n \"generateToolSecret\": true,\n \"sinchEstProjectId\": \"sinch-est-project-abc\",\n \"sinchEstTrunkId\": \"sinch-est-trunk-xyz\",\n \"sinchEstTrunkDomain\": \"example.sip.sinch.com\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Configuration saved"
}{
"success": false,
"error": "Call not found"
}{
"success": false,
"error": "Call not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Only the supplied fields are updated (no field is required, since admins partially edit).
e.g. elevenlabs. Pass null to clear.
When true, a fresh 32-byte hex elevenlabsToolSecret is generated and stored.
⌘I