cURL
curl --request PUT \
--url 'https://api.precallai.com/api/v1/dialer/update?id={id}' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"phone_number": "<string>",
"sid": "<string>",
"auth_token": "<string>",
"sip_termination_uri": "<string>",
"sip_trunk_user_name": "<string>",
"sip_trunk_password": "<string>"
}
'import requests
url = "https://api.precallai.com/api/v1/dialer/update?id={id}"
payload = {
"name": "<string>",
"phone_number": "<string>",
"sid": "<string>",
"auth_token": "<string>",
"sip_termination_uri": "<string>",
"sip_trunk_user_name": "<string>",
"sip_trunk_password": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
phone_number: '<string>',
sid: '<string>',
auth_token: '<string>',
sip_termination_uri: '<string>',
sip_trunk_user_name: '<string>',
sip_trunk_password: '<string>'
})
};
fetch('https://api.precallai.com/api/v1/dialer/update?id={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.precallai.com/api/v1/dialer/update?id={id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'phone_number' => '<string>',
'sid' => '<string>',
'auth_token' => '<string>',
'sip_termination_uri' => '<string>',
'sip_trunk_user_name' => '<string>',
'sip_trunk_password' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-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.precallai.com/api/v1/dialer/update?id={id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sid\": \"<string>\",\n \"auth_token\": \"<string>\",\n \"sip_termination_uri\": \"<string>\",\n \"sip_trunk_user_name\": \"<string>\",\n \"sip_trunk_password\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-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.put("https://api.precallai.com/api/v1/dialer/update?id={id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sid\": \"<string>\",\n \"auth_token\": \"<string>\",\n \"sip_termination_uri\": \"<string>\",\n \"sip_trunk_user_name\": \"<string>\",\n \"sip_trunk_password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.precallai.com/api/v1/dialer/update?id={id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sid\": \"<string>\",\n \"auth_token\": \"<string>\",\n \"sip_termination_uri\": \"<string>\",\n \"sip_trunk_user_name\": \"<string>\",\n \"sip_trunk_password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"type": "inbound",
"language": "en",
"name": "<string>",
"company_name": "<string>",
"accent": "<string>",
"goal": "<string>",
"start_speech": "<string>",
"voice_id": "<string>",
"voice_name": "<string>",
"script": "<string>",
"maximum_time_per_call": 123,
"is_voice_note": true,
"voice_note": "<string>",
"ai_model_id": "<string>",
"sentiment": {
"general_prompt": "<string>",
"positive_prompt": "<string>",
"negative_prompt": "<string>",
"neutral_prompt": "<string>"
},
"voice_speed": 1,
"is_filler": true,
"fillers": "umm",
"assistant_image": "https://precallai.s3.ap-south-1.amazonaws.com/assistant_profile/1.jpeg",
"ai_modal": "<string>",
"sensitivity": 600,
"temperature": 0.7,
"opt_out_script": "If a user explicitly expresses that they no longer wish to receive calls, such as by saying 'Don't call me again,' 'I'm not interested,' or any similar phrase indicating that they want to opt out of future communications, please trigger the 'optOut' function and inform the user that they will no longer be contacted for calls.",
"is_wait_start_speech": true,
"utterance_length": 1,
"meeting_note_prompt": "<string>",
"call_outcome_prompt": "<string>",
"actions": [
{
"type": "scheduleMeeting",
"meetingType": "openBooking",
"startDate": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"bookingDays": "<string>",
"timezone": "<string>",
"description": "<string>",
"say": "<string>",
"length": 123,
"prompt": "<string>"
}
],
"zapier_hook": "<string>",
"knowledge_base_Id": "<string>",
"is_recording": true,
"is_back_sound": true,
"is_sensitivity": true,
"is_opt_out": true
}{
"error": 123,
"message": "<string>"
}Dialers
Update Dialer
Update a Dialer
PUT
/
dialer
/
update?id=
{id}
cURL
curl --request PUT \
--url 'https://api.precallai.com/api/v1/dialer/update?id={id}' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"phone_number": "<string>",
"sid": "<string>",
"auth_token": "<string>",
"sip_termination_uri": "<string>",
"sip_trunk_user_name": "<string>",
"sip_trunk_password": "<string>"
}
'import requests
url = "https://api.precallai.com/api/v1/dialer/update?id={id}"
payload = {
"name": "<string>",
"phone_number": "<string>",
"sid": "<string>",
"auth_token": "<string>",
"sip_termination_uri": "<string>",
"sip_trunk_user_name": "<string>",
"sip_trunk_password": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
phone_number: '<string>',
sid: '<string>',
auth_token: '<string>',
sip_termination_uri: '<string>',
sip_trunk_user_name: '<string>',
sip_trunk_password: '<string>'
})
};
fetch('https://api.precallai.com/api/v1/dialer/update?id={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.precallai.com/api/v1/dialer/update?id={id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'phone_number' => '<string>',
'sid' => '<string>',
'auth_token' => '<string>',
'sip_termination_uri' => '<string>',
'sip_trunk_user_name' => '<string>',
'sip_trunk_password' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-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.precallai.com/api/v1/dialer/update?id={id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sid\": \"<string>\",\n \"auth_token\": \"<string>\",\n \"sip_termination_uri\": \"<string>\",\n \"sip_trunk_user_name\": \"<string>\",\n \"sip_trunk_password\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-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.put("https://api.precallai.com/api/v1/dialer/update?id={id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sid\": \"<string>\",\n \"auth_token\": \"<string>\",\n \"sip_termination_uri\": \"<string>\",\n \"sip_trunk_user_name\": \"<string>\",\n \"sip_trunk_password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.precallai.com/api/v1/dialer/update?id={id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sid\": \"<string>\",\n \"auth_token\": \"<string>\",\n \"sip_termination_uri\": \"<string>\",\n \"sip_trunk_user_name\": \"<string>\",\n \"sip_trunk_password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"type": "inbound",
"language": "en",
"name": "<string>",
"company_name": "<string>",
"accent": "<string>",
"goal": "<string>",
"start_speech": "<string>",
"voice_id": "<string>",
"voice_name": "<string>",
"script": "<string>",
"maximum_time_per_call": 123,
"is_voice_note": true,
"voice_note": "<string>",
"ai_model_id": "<string>",
"sentiment": {
"general_prompt": "<string>",
"positive_prompt": "<string>",
"negative_prompt": "<string>",
"neutral_prompt": "<string>"
},
"voice_speed": 1,
"is_filler": true,
"fillers": "umm",
"assistant_image": "https://precallai.s3.ap-south-1.amazonaws.com/assistant_profile/1.jpeg",
"ai_modal": "<string>",
"sensitivity": 600,
"temperature": 0.7,
"opt_out_script": "If a user explicitly expresses that they no longer wish to receive calls, such as by saying 'Don't call me again,' 'I'm not interested,' or any similar phrase indicating that they want to opt out of future communications, please trigger the 'optOut' function and inform the user that they will no longer be contacted for calls.",
"is_wait_start_speech": true,
"utterance_length": 1,
"meeting_note_prompt": "<string>",
"call_outcome_prompt": "<string>",
"actions": [
{
"type": "scheduleMeeting",
"meetingType": "openBooking",
"startDate": "<string>",
"startTime": "<string>",
"endTime": "<string>",
"bookingDays": "<string>",
"timezone": "<string>",
"description": "<string>",
"say": "<string>",
"length": 123,
"prompt": "<string>"
}
],
"zapier_hook": "<string>",
"knowledge_base_Id": "<string>",
"is_recording": true,
"is_back_sound": true,
"is_sensitivity": true,
"is_opt_out": true
}{
"error": 123,
"message": "<string>"
}Body
application/json
Dialer to update
Response
Dialer response
Language of the assistant. Supported values: en (English), de (German), hi (Hindi), es (Spanish), fr (French), it (Italian), ar-kw (Arabic Kuwait), gu (Gujarati), bn (Bengali), te (Telugu India), kn (Kannada India), ta (Tamil India), mr (Marathi).
Available options:
en, de, hi, es, fr, it, ar-kw, gu, bn, te, kn, ta, mr Assistant image url
Available options:
https://precallai.s3.ap-south-1.amazonaws.com/assistant_profile/1.jpeg, https://precallai.s3.ap-south-1.amazonaws.com/assistant_profile/1.jpeg, https://precallai.s3.ap-south-1.amazonaws.com/assistant_profile/3.jpeg, https://precallai.s3.ap-south-1.amazonaws.com/assistant_profile/4.jpeg, https://precallai.s3.ap-south-1.amazonaws.com/assistant_profile/5.jpeg If is_opt_out is enable then add opt out prompts
Available options:
If a user explicitly expresses that they no longer wish to receive calls, such as by saying 'Don't call me again,' 'I'm not interested,' or any similar phrase indicating that they want to opt out of future communications, please trigger the 'optOut' function and inform the user that they will no longer be contacted for calls. 
