Update agent
curl --request PUT \
--url https://app.freyavoice.ai/api/v2/agents/{agentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"config": {
"complianceConfig": {
"pciDss": false,
"mifidIi": false,
"euAiAct": false,
"soc2": false
},
"callTimeoutSettings": {
"silenceTimeout": 0,
"maximumDuration": 600,
"checkInMessage": null,
"closureMessage": null,
"maxRetries": 2,
"silenceTimeoutPrompt": null,
"maxDurationEndCall": null,
"dynamicWait": null
},
"voicemailDetection": {
"enabled": false,
"messageMode": "none",
"staticMessage": null,
"voicemailResponseDelay": 2
},
"dtmfConfig": {
"enabled": false,
"timeout": 2,
"terminationDigit": "#",
"prefix": "DTMF: "
},
"postConversationAnalysis": {
"summaryPrompt": null,
"autoDetectProblems": false,
"problemDetectionPrompt": null,
"problemDetectionInstructions": null,
"analysisModel": null
},
"privacyConfig": {
"enableRecording": false,
"getRecordingConsent": false,
"recordingConsentText": null,
"stopSecs": 1,
"preSpeechMs": 1,
"maxDurationSecs": 1
},
"turnAnalyzerConfig": {
"url": "<string>",
"modelPath": "<string>"
},
"guardrailsConfig": {
"guardrails_enabled": false,
"custom_rules_enabled": false,
"rules": [],
"refuse_message": "I'm sorry, I can't help with that.",
"max_regenerate_retries": 2,
"regenerate_wait_message": "One moment, please.",
"classifier_enabled": false,
"classifier_provider": "<string>",
"classifier_model": "<string>",
"input_config": {
"enabled": false,
"normalize": true,
"detect_injection": true,
"detect_weird_input": true,
"run_classifier": true,
"refuse_message": "I'm sorry, I can't help with that.",
"max_input_chars": 8000
}
},
"piiRedactionConfig": {
"enabled": false,
"maskEmail": true,
"maskPhone": true,
"maskPaymentCard": true,
"maskNationalId": true,
"maskIban": true,
"customRules": []
},
"routingLlmConfig": {
"provider": "<string>",
"model": "<string>",
"baseUrl": "<string>",
"apiKey": "<string>"
},
"extractionLlmConfig": {
"provider": "<string>",
"model": "<string>",
"baseUrl": "<string>",
"apiKey": "<string>"
},
"backgroundSoundUrl": null,
"syncSource": {
"url": "<string>",
"apiKey": "<string>",
"syncedAt": "2023-11-07T05:31:56Z"
},
"testVariables": {}
},
"commitMessage": "<string>",
"commitDescription": "<string>"
}
EOFimport requests
url = "https://app.freyavoice.ai/api/v2/agents/{agentId}"
payload = {
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"config": {
"complianceConfig": {
"pciDss": False,
"mifidIi": False,
"euAiAct": False,
"soc2": False
},
"callTimeoutSettings": {
"silenceTimeout": 0,
"maximumDuration": 600,
"checkInMessage": None,
"closureMessage": None,
"maxRetries": 2,
"silenceTimeoutPrompt": None,
"maxDurationEndCall": None,
"dynamicWait": None
},
"voicemailDetection": {
"enabled": False,
"messageMode": "none",
"staticMessage": None,
"voicemailResponseDelay": 2
},
"dtmfConfig": {
"enabled": False,
"timeout": 2,
"terminationDigit": "#",
"prefix": "DTMF: "
},
"postConversationAnalysis": {
"summaryPrompt": None,
"autoDetectProblems": False,
"problemDetectionPrompt": None,
"problemDetectionInstructions": None,
"analysisModel": None
},
"privacyConfig": {
"enableRecording": False,
"getRecordingConsent": False,
"recordingConsentText": None,
"stopSecs": 1,
"preSpeechMs": 1,
"maxDurationSecs": 1
},
"turnAnalyzerConfig": {
"url": "<string>",
"modelPath": "<string>"
},
"guardrailsConfig": {
"guardrails_enabled": False,
"custom_rules_enabled": False,
"rules": [],
"refuse_message": "I'm sorry, I can't help with that.",
"max_regenerate_retries": 2,
"regenerate_wait_message": "One moment, please.",
"classifier_enabled": False,
"classifier_provider": "<string>",
"classifier_model": "<string>",
"input_config": {
"enabled": False,
"normalize": True,
"detect_injection": True,
"detect_weird_input": True,
"run_classifier": True,
"refuse_message": "I'm sorry, I can't help with that.",
"max_input_chars": 8000
}
},
"piiRedactionConfig": {
"enabled": False,
"maskEmail": True,
"maskPhone": True,
"maskPaymentCard": True,
"maskNationalId": True,
"maskIban": True,
"customRules": []
},
"routingLlmConfig": {
"provider": "<string>",
"model": "<string>",
"baseUrl": "<string>",
"apiKey": "<string>"
},
"extractionLlmConfig": {
"provider": "<string>",
"model": "<string>",
"baseUrl": "<string>",
"apiKey": "<string>"
},
"backgroundSoundUrl": None,
"syncSource": {
"url": "<string>",
"apiKey": "<string>",
"syncedAt": "2023-11-07T05:31:56Z"
},
"testVariables": {}
},
"commitMessage": "<string>",
"commitDescription": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
workspaceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
config: {
complianceConfig: {pciDss: false, mifidIi: false, euAiAct: false, soc2: false},
callTimeoutSettings: {
silenceTimeout: 0,
maximumDuration: 600,
checkInMessage: null,
closureMessage: null,
maxRetries: 2,
silenceTimeoutPrompt: null,
maxDurationEndCall: null,
dynamicWait: null
},
voicemailDetection: {
enabled: false,
messageMode: 'none',
staticMessage: null,
voicemailResponseDelay: 2
},
dtmfConfig: {enabled: false, timeout: 2, terminationDigit: '#', prefix: 'DTMF: '},
postConversationAnalysis: {
summaryPrompt: null,
autoDetectProblems: false,
problemDetectionPrompt: null,
problemDetectionInstructions: null,
analysisModel: null
},
privacyConfig: {
enableRecording: false,
getRecordingConsent: false,
recordingConsentText: null,
stopSecs: 1,
preSpeechMs: 1,
maxDurationSecs: 1
},
turnAnalyzerConfig: {url: '<string>', modelPath: '<string>'},
guardrailsConfig: {
guardrails_enabled: false,
custom_rules_enabled: false,
rules: [],
refuse_message: 'I\'m sorry, I can\'t help with that.',
max_regenerate_retries: 2,
regenerate_wait_message: 'One moment, please.',
classifier_enabled: false,
classifier_provider: '<string>',
classifier_model: '<string>',
input_config: {
enabled: false,
normalize: true,
detect_injection: true,
detect_weird_input: true,
run_classifier: true,
refuse_message: 'I\'m sorry, I can\'t help with that.',
max_input_chars: 8000
}
},
piiRedactionConfig: {
enabled: false,
maskEmail: true,
maskPhone: true,
maskPaymentCard: true,
maskNationalId: true,
maskIban: true,
customRules: []
},
routingLlmConfig: {
provider: '<string>',
model: '<string>',
baseUrl: '<string>',
apiKey: '<string>'
},
extractionLlmConfig: {
provider: '<string>',
model: '<string>',
baseUrl: '<string>',
apiKey: '<string>'
},
backgroundSoundUrl: null,
syncSource: {url: '<string>', apiKey: '<string>', syncedAt: '2023-11-07T05:31:56Z'},
testVariables: {}
},
commitMessage: '<string>',
commitDescription: '<string>'
})
};
fetch('https://app.freyavoice.ai/api/v2/agents/{agentId}', 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://app.freyavoice.ai/api/v2/agents/{agentId}",
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([
'agentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'workspaceId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'config' => [
'complianceConfig' => [
'pciDss' => false,
'mifidIi' => false,
'euAiAct' => false,
'soc2' => false
],
'callTimeoutSettings' => [
'silenceTimeout' => 0,
'maximumDuration' => 600,
'checkInMessage' => null,
'closureMessage' => null,
'maxRetries' => 2,
'silenceTimeoutPrompt' => null,
'maxDurationEndCall' => null,
'dynamicWait' => null
],
'voicemailDetection' => [
'enabled' => false,
'messageMode' => 'none',
'staticMessage' => null,
'voicemailResponseDelay' => 2
],
'dtmfConfig' => [
'enabled' => false,
'timeout' => 2,
'terminationDigit' => '#',
'prefix' => 'DTMF: '
],
'postConversationAnalysis' => [
'summaryPrompt' => null,
'autoDetectProblems' => false,
'problemDetectionPrompt' => null,
'problemDetectionInstructions' => null,
'analysisModel' => null
],
'privacyConfig' => [
'enableRecording' => false,
'getRecordingConsent' => false,
'recordingConsentText' => null,
'stopSecs' => 1,
'preSpeechMs' => 1,
'maxDurationSecs' => 1
],
'turnAnalyzerConfig' => [
'url' => '<string>',
'modelPath' => '<string>'
],
'guardrailsConfig' => [
'guardrails_enabled' => false,
'custom_rules_enabled' => false,
'rules' => [
],
'refuse_message' => 'I\'m sorry, I can\'t help with that.',
'max_regenerate_retries' => 2,
'regenerate_wait_message' => 'One moment, please.',
'classifier_enabled' => false,
'classifier_provider' => '<string>',
'classifier_model' => '<string>',
'input_config' => [
'enabled' => false,
'normalize' => true,
'detect_injection' => true,
'detect_weird_input' => true,
'run_classifier' => true,
'refuse_message' => 'I\'m sorry, I can\'t help with that.',
'max_input_chars' => 8000
]
],
'piiRedactionConfig' => [
'enabled' => false,
'maskEmail' => true,
'maskPhone' => true,
'maskPaymentCard' => true,
'maskNationalId' => true,
'maskIban' => true,
'customRules' => [
]
],
'routingLlmConfig' => [
'provider' => '<string>',
'model' => '<string>',
'baseUrl' => '<string>',
'apiKey' => '<string>'
],
'extractionLlmConfig' => [
'provider' => '<string>',
'model' => '<string>',
'baseUrl' => '<string>',
'apiKey' => '<string>'
],
'backgroundSoundUrl' => null,
'syncSource' => [
'url' => '<string>',
'apiKey' => '<string>',
'syncedAt' => '2023-11-07T05:31:56Z'
],
'testVariables' => [
]
],
'commitMessage' => '<string>',
'commitDescription' => '<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://app.freyavoice.ai/api/v2/agents/{agentId}"
payload := strings.NewReader("{\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workspaceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"config\": {\n \"complianceConfig\": {\n \"pciDss\": false,\n \"mifidIi\": false,\n \"euAiAct\": false,\n \"soc2\": false\n },\n \"callTimeoutSettings\": {\n \"silenceTimeout\": 0,\n \"maximumDuration\": 600,\n \"checkInMessage\": null,\n \"closureMessage\": null,\n \"maxRetries\": 2,\n \"silenceTimeoutPrompt\": null,\n \"maxDurationEndCall\": null,\n \"dynamicWait\": null\n },\n \"voicemailDetection\": {\n \"enabled\": false,\n \"messageMode\": \"none\",\n \"staticMessage\": null,\n \"voicemailResponseDelay\": 2\n },\n \"dtmfConfig\": {\n \"enabled\": false,\n \"timeout\": 2,\n \"terminationDigit\": \"#\",\n \"prefix\": \"DTMF: \"\n },\n \"postConversationAnalysis\": {\n \"summaryPrompt\": null,\n \"autoDetectProblems\": false,\n \"problemDetectionPrompt\": null,\n \"problemDetectionInstructions\": null,\n \"analysisModel\": null\n },\n \"privacyConfig\": {\n \"enableRecording\": false,\n \"getRecordingConsent\": false,\n \"recordingConsentText\": null,\n \"stopSecs\": 1,\n \"preSpeechMs\": 1,\n \"maxDurationSecs\": 1\n },\n \"turnAnalyzerConfig\": {\n \"url\": \"<string>\",\n \"modelPath\": \"<string>\"\n },\n \"guardrailsConfig\": {\n \"guardrails_enabled\": false,\n \"custom_rules_enabled\": false,\n \"rules\": [],\n \"refuse_message\": \"I'm sorry, I can't help with that.\",\n \"max_regenerate_retries\": 2,\n \"regenerate_wait_message\": \"One moment, please.\",\n \"classifier_enabled\": false,\n \"classifier_provider\": \"<string>\",\n \"classifier_model\": \"<string>\",\n \"input_config\": {\n \"enabled\": false,\n \"normalize\": true,\n \"detect_injection\": true,\n \"detect_weird_input\": true,\n \"run_classifier\": true,\n \"refuse_message\": \"I'm sorry, I can't help with that.\",\n \"max_input_chars\": 8000\n }\n },\n \"piiRedactionConfig\": {\n \"enabled\": false,\n \"maskEmail\": true,\n \"maskPhone\": true,\n \"maskPaymentCard\": true,\n \"maskNationalId\": true,\n \"maskIban\": true,\n \"customRules\": []\n },\n \"routingLlmConfig\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"apiKey\": \"<string>\"\n },\n \"extractionLlmConfig\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"apiKey\": \"<string>\"\n },\n \"backgroundSoundUrl\": null,\n \"syncSource\": {\n \"url\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"syncedAt\": \"2023-11-07T05:31:56Z\"\n },\n \"testVariables\": {}\n },\n \"commitMessage\": \"<string>\",\n \"commitDescription\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.freyavoice.ai/api/v2/agents/{agentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workspaceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"config\": {\n \"complianceConfig\": {\n \"pciDss\": false,\n \"mifidIi\": false,\n \"euAiAct\": false,\n \"soc2\": false\n },\n \"callTimeoutSettings\": {\n \"silenceTimeout\": 0,\n \"maximumDuration\": 600,\n \"checkInMessage\": null,\n \"closureMessage\": null,\n \"maxRetries\": 2,\n \"silenceTimeoutPrompt\": null,\n \"maxDurationEndCall\": null,\n \"dynamicWait\": null\n },\n \"voicemailDetection\": {\n \"enabled\": false,\n \"messageMode\": \"none\",\n \"staticMessage\": null,\n \"voicemailResponseDelay\": 2\n },\n \"dtmfConfig\": {\n \"enabled\": false,\n \"timeout\": 2,\n \"terminationDigit\": \"#\",\n \"prefix\": \"DTMF: \"\n },\n \"postConversationAnalysis\": {\n \"summaryPrompt\": null,\n \"autoDetectProblems\": false,\n \"problemDetectionPrompt\": null,\n \"problemDetectionInstructions\": null,\n \"analysisModel\": null\n },\n \"privacyConfig\": {\n \"enableRecording\": false,\n \"getRecordingConsent\": false,\n \"recordingConsentText\": null,\n \"stopSecs\": 1,\n \"preSpeechMs\": 1,\n \"maxDurationSecs\": 1\n },\n \"turnAnalyzerConfig\": {\n \"url\": \"<string>\",\n \"modelPath\": \"<string>\"\n },\n \"guardrailsConfig\": {\n \"guardrails_enabled\": false,\n \"custom_rules_enabled\": false,\n \"rules\": [],\n \"refuse_message\": \"I'm sorry, I can't help with that.\",\n \"max_regenerate_retries\": 2,\n \"regenerate_wait_message\": \"One moment, please.\",\n \"classifier_enabled\": false,\n \"classifier_provider\": \"<string>\",\n \"classifier_model\": \"<string>\",\n \"input_config\": {\n \"enabled\": false,\n \"normalize\": true,\n \"detect_injection\": true,\n \"detect_weird_input\": true,\n \"run_classifier\": true,\n \"refuse_message\": \"I'm sorry, I can't help with that.\",\n \"max_input_chars\": 8000\n }\n },\n \"piiRedactionConfig\": {\n \"enabled\": false,\n \"maskEmail\": true,\n \"maskPhone\": true,\n \"maskPaymentCard\": true,\n \"maskNationalId\": true,\n \"maskIban\": true,\n \"customRules\": []\n },\n \"routingLlmConfig\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"apiKey\": \"<string>\"\n },\n \"extractionLlmConfig\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"apiKey\": \"<string>\"\n },\n \"backgroundSoundUrl\": null,\n \"syncSource\": {\n \"url\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"syncedAt\": \"2023-11-07T05:31:56Z\"\n },\n \"testVariables\": {}\n },\n \"commitMessage\": \"<string>\",\n \"commitDescription\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.freyavoice.ai/api/v2/agents/{agentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workspaceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"config\": {\n \"complianceConfig\": {\n \"pciDss\": false,\n \"mifidIi\": false,\n \"euAiAct\": false,\n \"soc2\": false\n },\n \"callTimeoutSettings\": {\n \"silenceTimeout\": 0,\n \"maximumDuration\": 600,\n \"checkInMessage\": null,\n \"closureMessage\": null,\n \"maxRetries\": 2,\n \"silenceTimeoutPrompt\": null,\n \"maxDurationEndCall\": null,\n \"dynamicWait\": null\n },\n \"voicemailDetection\": {\n \"enabled\": false,\n \"messageMode\": \"none\",\n \"staticMessage\": null,\n \"voicemailResponseDelay\": 2\n },\n \"dtmfConfig\": {\n \"enabled\": false,\n \"timeout\": 2,\n \"terminationDigit\": \"#\",\n \"prefix\": \"DTMF: \"\n },\n \"postConversationAnalysis\": {\n \"summaryPrompt\": null,\n \"autoDetectProblems\": false,\n \"problemDetectionPrompt\": null,\n \"problemDetectionInstructions\": null,\n \"analysisModel\": null\n },\n \"privacyConfig\": {\n \"enableRecording\": false,\n \"getRecordingConsent\": false,\n \"recordingConsentText\": null,\n \"stopSecs\": 1,\n \"preSpeechMs\": 1,\n \"maxDurationSecs\": 1\n },\n \"turnAnalyzerConfig\": {\n \"url\": \"<string>\",\n \"modelPath\": \"<string>\"\n },\n \"guardrailsConfig\": {\n \"guardrails_enabled\": false,\n \"custom_rules_enabled\": false,\n \"rules\": [],\n \"refuse_message\": \"I'm sorry, I can't help with that.\",\n \"max_regenerate_retries\": 2,\n \"regenerate_wait_message\": \"One moment, please.\",\n \"classifier_enabled\": false,\n \"classifier_provider\": \"<string>\",\n \"classifier_model\": \"<string>\",\n \"input_config\": {\n \"enabled\": false,\n \"normalize\": true,\n \"detect_injection\": true,\n \"detect_weird_input\": true,\n \"run_classifier\": true,\n \"refuse_message\": \"I'm sorry, I can't help with that.\",\n \"max_input_chars\": 8000\n }\n },\n \"piiRedactionConfig\": {\n \"enabled\": false,\n \"maskEmail\": true,\n \"maskPhone\": true,\n \"maskPaymentCard\": true,\n \"maskNationalId\": true,\n \"maskIban\": true,\n \"customRules\": []\n },\n \"routingLlmConfig\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"apiKey\": \"<string>\"\n },\n \"extractionLlmConfig\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"apiKey\": \"<string>\"\n },\n \"backgroundSoundUrl\": null,\n \"syncSource\": {\n \"url\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"syncedAt\": \"2023-11-07T05:31:56Z\"\n },\n \"testVariables\": {}\n },\n \"commitMessage\": \"<string>\",\n \"commitDescription\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"message": "<string>",
"result": {
"agent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"config": {
"llmConfig": {
"provider": "<string>",
"model": "<string>",
"systemPrompt": "<string>",
"baseUrl": "<string>",
"apiKey": "<string>",
"firstMessage": null,
"firstMessageMode": "assistant-waits-for-user",
"disableInterruptionsDuringFirstMessage": false,
"maxTokens": 1000,
"maxContextWindow": 5000512,
"temperature": 0.7,
"tools": [],
"additionalSettings": {},
"retryExhaustionMessage": "<string>",
"farewellMessage": "<string>"
},
"ttsConfig": {
"provider": "<string>",
"voiceId": "<string>",
"model": null,
"language": "multi",
"baseUrl": "<string>",
"apiKey": "<string>",
"additionalSettings": {},
"startSpeakingPlan": {
"waitSeconds": 0.4,
"backgroundNoisePhrases": [
"<string>"
]
},
"stopSpeakingPlan": {
"numberOfWords": 1,
"voiceSeconds": 0.4,
"backOffSeconds": 0.4,
"acknowledgementPhrases": [
"<string>"
],
"interruptionPhrases": [
"<string>"
]
},
"textSubstitutions": [
{
"pattern": "<string>",
"replacement": "<string>",
"caseInsensitive": true
}
],
"speechNormalization": {
"emails": true,
"urls": true,
"emojis": true,
"phoneNumbers": false,
"identityNumbers": false,
"generalNumbers": false,
"advanced": {
"numbers": false,
"money": false,
"dates": false,
"times": false,
"percentages": false,
"fractions": false,
"units": false,
"ordinals": false,
"abbreviations": false,
"iban": false,
"symbols": false
}
},
"normalizationPrompt": "<string>"
},
"sttConfig": {
"provider": "<string>",
"model": null,
"language": "multi",
"baseUrl": "<string>",
"apiKey": "<string>",
"additionalSettings": {},
"confidenceReask": {
"enabled": false,
"threshold": 0.3,
"reduction": "min",
"disableOnDigitNodes": true,
"reaskMode": "phrase",
"reaskPhrases": null,
"maxConsecutiveReasks": 2
}
},
"complianceConfig": {
"pciDss": false,
"mifidIi": false,
"euAiAct": false,
"soc2": false
},
"callTimeoutSettings": {
"silenceTimeout": 0,
"maximumDuration": 600,
"checkInMessage": null,
"closureMessage": null,
"maxRetries": 2,
"silenceTimeoutPrompt": null,
"maxDurationEndCall": null,
"dynamicWait": null
},
"voicemailDetection": {
"enabled": false,
"messageMode": "none",
"staticMessage": null,
"voicemailResponseDelay": 2
},
"dtmfConfig": {
"enabled": false,
"timeout": 2,
"terminationDigit": "#",
"prefix": "DTMF: "
},
"postConversationAnalysis": {
"summaryPrompt": null,
"autoDetectProblems": false,
"problemDetectionPrompt": null,
"problemDetectionInstructions": null,
"analysisModel": null
},
"privacyConfig": {
"enableRecording": false,
"getRecordingConsent": false,
"recordingConsentText": null,
"stopSecs": 1,
"preSpeechMs": 1,
"maxDurationSecs": 1
},
"turnAnalyzerConfig": {
"provider": "local",
"url": "<string>",
"modelPath": "<string>"
},
"guardrailsConfig": {
"guardrails_enabled": false,
"custom_rules_enabled": false,
"rules": [],
"refuse_message": "I'm sorry, I can't help with that.",
"max_regenerate_retries": 2,
"regenerate_wait_message": "One moment, please.",
"classifier_enabled": false,
"classifier_provider": "<string>",
"classifier_model": "<string>",
"input_config": {
"enabled": false,
"normalize": true,
"detect_injection": true,
"detect_weird_input": true,
"run_classifier": true,
"refuse_message": "I'm sorry, I can't help with that.",
"max_input_chars": 8000
}
},
"piiRedactionConfig": {
"enabled": false,
"maskEmail": true,
"maskPhone": true,
"maskPaymentCard": true,
"maskNationalId": true,
"maskIban": true,
"customRules": []
},
"routingLlmConfig": {
"provider": "<string>",
"model": "<string>",
"baseUrl": "<string>",
"apiKey": "<string>"
},
"extractionLlmConfig": {
"provider": "<string>",
"model": "<string>",
"baseUrl": "<string>",
"apiKey": "<string>"
},
"backgroundSoundUrl": null,
"syncSource": {
"url": "<string>",
"apiKey": "<string>",
"syncedAt": "2023-11-07T05:31:56Z"
},
"testVariables": {}
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"entityType": "workflow",
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isImported": false
}
}
}
}{
"success": false,
"data": {
"message": "<string>",
"result": "<unknown>"
}
}{
"success": false,
"data": {
"message": "<string>",
"result": "<unknown>"
}
}{
"success": false,
"data": {
"message": "<string>",
"result": "<unknown>"
}
}{
"success": false,
"data": {
"message": "<string>",
"result": "<unknown>"
}
}Agents
Update agent
Updates an existing agent’s name, configuration, or files.
PUT
/
agents
/
{agentId}
Update agent
curl --request PUT \
--url https://app.freyavoice.ai/api/v2/agents/{agentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"config": {
"complianceConfig": {
"pciDss": false,
"mifidIi": false,
"euAiAct": false,
"soc2": false
},
"callTimeoutSettings": {
"silenceTimeout": 0,
"maximumDuration": 600,
"checkInMessage": null,
"closureMessage": null,
"maxRetries": 2,
"silenceTimeoutPrompt": null,
"maxDurationEndCall": null,
"dynamicWait": null
},
"voicemailDetection": {
"enabled": false,
"messageMode": "none",
"staticMessage": null,
"voicemailResponseDelay": 2
},
"dtmfConfig": {
"enabled": false,
"timeout": 2,
"terminationDigit": "#",
"prefix": "DTMF: "
},
"postConversationAnalysis": {
"summaryPrompt": null,
"autoDetectProblems": false,
"problemDetectionPrompt": null,
"problemDetectionInstructions": null,
"analysisModel": null
},
"privacyConfig": {
"enableRecording": false,
"getRecordingConsent": false,
"recordingConsentText": null,
"stopSecs": 1,
"preSpeechMs": 1,
"maxDurationSecs": 1
},
"turnAnalyzerConfig": {
"url": "<string>",
"modelPath": "<string>"
},
"guardrailsConfig": {
"guardrails_enabled": false,
"custom_rules_enabled": false,
"rules": [],
"refuse_message": "I'm sorry, I can't help with that.",
"max_regenerate_retries": 2,
"regenerate_wait_message": "One moment, please.",
"classifier_enabled": false,
"classifier_provider": "<string>",
"classifier_model": "<string>",
"input_config": {
"enabled": false,
"normalize": true,
"detect_injection": true,
"detect_weird_input": true,
"run_classifier": true,
"refuse_message": "I'm sorry, I can't help with that.",
"max_input_chars": 8000
}
},
"piiRedactionConfig": {
"enabled": false,
"maskEmail": true,
"maskPhone": true,
"maskPaymentCard": true,
"maskNationalId": true,
"maskIban": true,
"customRules": []
},
"routingLlmConfig": {
"provider": "<string>",
"model": "<string>",
"baseUrl": "<string>",
"apiKey": "<string>"
},
"extractionLlmConfig": {
"provider": "<string>",
"model": "<string>",
"baseUrl": "<string>",
"apiKey": "<string>"
},
"backgroundSoundUrl": null,
"syncSource": {
"url": "<string>",
"apiKey": "<string>",
"syncedAt": "2023-11-07T05:31:56Z"
},
"testVariables": {}
},
"commitMessage": "<string>",
"commitDescription": "<string>"
}
EOFimport requests
url = "https://app.freyavoice.ai/api/v2/agents/{agentId}"
payload = {
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"config": {
"complianceConfig": {
"pciDss": False,
"mifidIi": False,
"euAiAct": False,
"soc2": False
},
"callTimeoutSettings": {
"silenceTimeout": 0,
"maximumDuration": 600,
"checkInMessage": None,
"closureMessage": None,
"maxRetries": 2,
"silenceTimeoutPrompt": None,
"maxDurationEndCall": None,
"dynamicWait": None
},
"voicemailDetection": {
"enabled": False,
"messageMode": "none",
"staticMessage": None,
"voicemailResponseDelay": 2
},
"dtmfConfig": {
"enabled": False,
"timeout": 2,
"terminationDigit": "#",
"prefix": "DTMF: "
},
"postConversationAnalysis": {
"summaryPrompt": None,
"autoDetectProblems": False,
"problemDetectionPrompt": None,
"problemDetectionInstructions": None,
"analysisModel": None
},
"privacyConfig": {
"enableRecording": False,
"getRecordingConsent": False,
"recordingConsentText": None,
"stopSecs": 1,
"preSpeechMs": 1,
"maxDurationSecs": 1
},
"turnAnalyzerConfig": {
"url": "<string>",
"modelPath": "<string>"
},
"guardrailsConfig": {
"guardrails_enabled": False,
"custom_rules_enabled": False,
"rules": [],
"refuse_message": "I'm sorry, I can't help with that.",
"max_regenerate_retries": 2,
"regenerate_wait_message": "One moment, please.",
"classifier_enabled": False,
"classifier_provider": "<string>",
"classifier_model": "<string>",
"input_config": {
"enabled": False,
"normalize": True,
"detect_injection": True,
"detect_weird_input": True,
"run_classifier": True,
"refuse_message": "I'm sorry, I can't help with that.",
"max_input_chars": 8000
}
},
"piiRedactionConfig": {
"enabled": False,
"maskEmail": True,
"maskPhone": True,
"maskPaymentCard": True,
"maskNationalId": True,
"maskIban": True,
"customRules": []
},
"routingLlmConfig": {
"provider": "<string>",
"model": "<string>",
"baseUrl": "<string>",
"apiKey": "<string>"
},
"extractionLlmConfig": {
"provider": "<string>",
"model": "<string>",
"baseUrl": "<string>",
"apiKey": "<string>"
},
"backgroundSoundUrl": None,
"syncSource": {
"url": "<string>",
"apiKey": "<string>",
"syncedAt": "2023-11-07T05:31:56Z"
},
"testVariables": {}
},
"commitMessage": "<string>",
"commitDescription": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
workspaceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
config: {
complianceConfig: {pciDss: false, mifidIi: false, euAiAct: false, soc2: false},
callTimeoutSettings: {
silenceTimeout: 0,
maximumDuration: 600,
checkInMessage: null,
closureMessage: null,
maxRetries: 2,
silenceTimeoutPrompt: null,
maxDurationEndCall: null,
dynamicWait: null
},
voicemailDetection: {
enabled: false,
messageMode: 'none',
staticMessage: null,
voicemailResponseDelay: 2
},
dtmfConfig: {enabled: false, timeout: 2, terminationDigit: '#', prefix: 'DTMF: '},
postConversationAnalysis: {
summaryPrompt: null,
autoDetectProblems: false,
problemDetectionPrompt: null,
problemDetectionInstructions: null,
analysisModel: null
},
privacyConfig: {
enableRecording: false,
getRecordingConsent: false,
recordingConsentText: null,
stopSecs: 1,
preSpeechMs: 1,
maxDurationSecs: 1
},
turnAnalyzerConfig: {url: '<string>', modelPath: '<string>'},
guardrailsConfig: {
guardrails_enabled: false,
custom_rules_enabled: false,
rules: [],
refuse_message: 'I\'m sorry, I can\'t help with that.',
max_regenerate_retries: 2,
regenerate_wait_message: 'One moment, please.',
classifier_enabled: false,
classifier_provider: '<string>',
classifier_model: '<string>',
input_config: {
enabled: false,
normalize: true,
detect_injection: true,
detect_weird_input: true,
run_classifier: true,
refuse_message: 'I\'m sorry, I can\'t help with that.',
max_input_chars: 8000
}
},
piiRedactionConfig: {
enabled: false,
maskEmail: true,
maskPhone: true,
maskPaymentCard: true,
maskNationalId: true,
maskIban: true,
customRules: []
},
routingLlmConfig: {
provider: '<string>',
model: '<string>',
baseUrl: '<string>',
apiKey: '<string>'
},
extractionLlmConfig: {
provider: '<string>',
model: '<string>',
baseUrl: '<string>',
apiKey: '<string>'
},
backgroundSoundUrl: null,
syncSource: {url: '<string>', apiKey: '<string>', syncedAt: '2023-11-07T05:31:56Z'},
testVariables: {}
},
commitMessage: '<string>',
commitDescription: '<string>'
})
};
fetch('https://app.freyavoice.ai/api/v2/agents/{agentId}', 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://app.freyavoice.ai/api/v2/agents/{agentId}",
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([
'agentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'workspaceId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'config' => [
'complianceConfig' => [
'pciDss' => false,
'mifidIi' => false,
'euAiAct' => false,
'soc2' => false
],
'callTimeoutSettings' => [
'silenceTimeout' => 0,
'maximumDuration' => 600,
'checkInMessage' => null,
'closureMessage' => null,
'maxRetries' => 2,
'silenceTimeoutPrompt' => null,
'maxDurationEndCall' => null,
'dynamicWait' => null
],
'voicemailDetection' => [
'enabled' => false,
'messageMode' => 'none',
'staticMessage' => null,
'voicemailResponseDelay' => 2
],
'dtmfConfig' => [
'enabled' => false,
'timeout' => 2,
'terminationDigit' => '#',
'prefix' => 'DTMF: '
],
'postConversationAnalysis' => [
'summaryPrompt' => null,
'autoDetectProblems' => false,
'problemDetectionPrompt' => null,
'problemDetectionInstructions' => null,
'analysisModel' => null
],
'privacyConfig' => [
'enableRecording' => false,
'getRecordingConsent' => false,
'recordingConsentText' => null,
'stopSecs' => 1,
'preSpeechMs' => 1,
'maxDurationSecs' => 1
],
'turnAnalyzerConfig' => [
'url' => '<string>',
'modelPath' => '<string>'
],
'guardrailsConfig' => [
'guardrails_enabled' => false,
'custom_rules_enabled' => false,
'rules' => [
],
'refuse_message' => 'I\'m sorry, I can\'t help with that.',
'max_regenerate_retries' => 2,
'regenerate_wait_message' => 'One moment, please.',
'classifier_enabled' => false,
'classifier_provider' => '<string>',
'classifier_model' => '<string>',
'input_config' => [
'enabled' => false,
'normalize' => true,
'detect_injection' => true,
'detect_weird_input' => true,
'run_classifier' => true,
'refuse_message' => 'I\'m sorry, I can\'t help with that.',
'max_input_chars' => 8000
]
],
'piiRedactionConfig' => [
'enabled' => false,
'maskEmail' => true,
'maskPhone' => true,
'maskPaymentCard' => true,
'maskNationalId' => true,
'maskIban' => true,
'customRules' => [
]
],
'routingLlmConfig' => [
'provider' => '<string>',
'model' => '<string>',
'baseUrl' => '<string>',
'apiKey' => '<string>'
],
'extractionLlmConfig' => [
'provider' => '<string>',
'model' => '<string>',
'baseUrl' => '<string>',
'apiKey' => '<string>'
],
'backgroundSoundUrl' => null,
'syncSource' => [
'url' => '<string>',
'apiKey' => '<string>',
'syncedAt' => '2023-11-07T05:31:56Z'
],
'testVariables' => [
]
],
'commitMessage' => '<string>',
'commitDescription' => '<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://app.freyavoice.ai/api/v2/agents/{agentId}"
payload := strings.NewReader("{\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workspaceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"config\": {\n \"complianceConfig\": {\n \"pciDss\": false,\n \"mifidIi\": false,\n \"euAiAct\": false,\n \"soc2\": false\n },\n \"callTimeoutSettings\": {\n \"silenceTimeout\": 0,\n \"maximumDuration\": 600,\n \"checkInMessage\": null,\n \"closureMessage\": null,\n \"maxRetries\": 2,\n \"silenceTimeoutPrompt\": null,\n \"maxDurationEndCall\": null,\n \"dynamicWait\": null\n },\n \"voicemailDetection\": {\n \"enabled\": false,\n \"messageMode\": \"none\",\n \"staticMessage\": null,\n \"voicemailResponseDelay\": 2\n },\n \"dtmfConfig\": {\n \"enabled\": false,\n \"timeout\": 2,\n \"terminationDigit\": \"#\",\n \"prefix\": \"DTMF: \"\n },\n \"postConversationAnalysis\": {\n \"summaryPrompt\": null,\n \"autoDetectProblems\": false,\n \"problemDetectionPrompt\": null,\n \"problemDetectionInstructions\": null,\n \"analysisModel\": null\n },\n \"privacyConfig\": {\n \"enableRecording\": false,\n \"getRecordingConsent\": false,\n \"recordingConsentText\": null,\n \"stopSecs\": 1,\n \"preSpeechMs\": 1,\n \"maxDurationSecs\": 1\n },\n \"turnAnalyzerConfig\": {\n \"url\": \"<string>\",\n \"modelPath\": \"<string>\"\n },\n \"guardrailsConfig\": {\n \"guardrails_enabled\": false,\n \"custom_rules_enabled\": false,\n \"rules\": [],\n \"refuse_message\": \"I'm sorry, I can't help with that.\",\n \"max_regenerate_retries\": 2,\n \"regenerate_wait_message\": \"One moment, please.\",\n \"classifier_enabled\": false,\n \"classifier_provider\": \"<string>\",\n \"classifier_model\": \"<string>\",\n \"input_config\": {\n \"enabled\": false,\n \"normalize\": true,\n \"detect_injection\": true,\n \"detect_weird_input\": true,\n \"run_classifier\": true,\n \"refuse_message\": \"I'm sorry, I can't help with that.\",\n \"max_input_chars\": 8000\n }\n },\n \"piiRedactionConfig\": {\n \"enabled\": false,\n \"maskEmail\": true,\n \"maskPhone\": true,\n \"maskPaymentCard\": true,\n \"maskNationalId\": true,\n \"maskIban\": true,\n \"customRules\": []\n },\n \"routingLlmConfig\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"apiKey\": \"<string>\"\n },\n \"extractionLlmConfig\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"apiKey\": \"<string>\"\n },\n \"backgroundSoundUrl\": null,\n \"syncSource\": {\n \"url\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"syncedAt\": \"2023-11-07T05:31:56Z\"\n },\n \"testVariables\": {}\n },\n \"commitMessage\": \"<string>\",\n \"commitDescription\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.freyavoice.ai/api/v2/agents/{agentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workspaceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"config\": {\n \"complianceConfig\": {\n \"pciDss\": false,\n \"mifidIi\": false,\n \"euAiAct\": false,\n \"soc2\": false\n },\n \"callTimeoutSettings\": {\n \"silenceTimeout\": 0,\n \"maximumDuration\": 600,\n \"checkInMessage\": null,\n \"closureMessage\": null,\n \"maxRetries\": 2,\n \"silenceTimeoutPrompt\": null,\n \"maxDurationEndCall\": null,\n \"dynamicWait\": null\n },\n \"voicemailDetection\": {\n \"enabled\": false,\n \"messageMode\": \"none\",\n \"staticMessage\": null,\n \"voicemailResponseDelay\": 2\n },\n \"dtmfConfig\": {\n \"enabled\": false,\n \"timeout\": 2,\n \"terminationDigit\": \"#\",\n \"prefix\": \"DTMF: \"\n },\n \"postConversationAnalysis\": {\n \"summaryPrompt\": null,\n \"autoDetectProblems\": false,\n \"problemDetectionPrompt\": null,\n \"problemDetectionInstructions\": null,\n \"analysisModel\": null\n },\n \"privacyConfig\": {\n \"enableRecording\": false,\n \"getRecordingConsent\": false,\n \"recordingConsentText\": null,\n \"stopSecs\": 1,\n \"preSpeechMs\": 1,\n \"maxDurationSecs\": 1\n },\n \"turnAnalyzerConfig\": {\n \"url\": \"<string>\",\n \"modelPath\": \"<string>\"\n },\n \"guardrailsConfig\": {\n \"guardrails_enabled\": false,\n \"custom_rules_enabled\": false,\n \"rules\": [],\n \"refuse_message\": \"I'm sorry, I can't help with that.\",\n \"max_regenerate_retries\": 2,\n \"regenerate_wait_message\": \"One moment, please.\",\n \"classifier_enabled\": false,\n \"classifier_provider\": \"<string>\",\n \"classifier_model\": \"<string>\",\n \"input_config\": {\n \"enabled\": false,\n \"normalize\": true,\n \"detect_injection\": true,\n \"detect_weird_input\": true,\n \"run_classifier\": true,\n \"refuse_message\": \"I'm sorry, I can't help with that.\",\n \"max_input_chars\": 8000\n }\n },\n \"piiRedactionConfig\": {\n \"enabled\": false,\n \"maskEmail\": true,\n \"maskPhone\": true,\n \"maskPaymentCard\": true,\n \"maskNationalId\": true,\n \"maskIban\": true,\n \"customRules\": []\n },\n \"routingLlmConfig\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"apiKey\": \"<string>\"\n },\n \"extractionLlmConfig\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"apiKey\": \"<string>\"\n },\n \"backgroundSoundUrl\": null,\n \"syncSource\": {\n \"url\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"syncedAt\": \"2023-11-07T05:31:56Z\"\n },\n \"testVariables\": {}\n },\n \"commitMessage\": \"<string>\",\n \"commitDescription\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.freyavoice.ai/api/v2/agents/{agentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"workspaceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"config\": {\n \"complianceConfig\": {\n \"pciDss\": false,\n \"mifidIi\": false,\n \"euAiAct\": false,\n \"soc2\": false\n },\n \"callTimeoutSettings\": {\n \"silenceTimeout\": 0,\n \"maximumDuration\": 600,\n \"checkInMessage\": null,\n \"closureMessage\": null,\n \"maxRetries\": 2,\n \"silenceTimeoutPrompt\": null,\n \"maxDurationEndCall\": null,\n \"dynamicWait\": null\n },\n \"voicemailDetection\": {\n \"enabled\": false,\n \"messageMode\": \"none\",\n \"staticMessage\": null,\n \"voicemailResponseDelay\": 2\n },\n \"dtmfConfig\": {\n \"enabled\": false,\n \"timeout\": 2,\n \"terminationDigit\": \"#\",\n \"prefix\": \"DTMF: \"\n },\n \"postConversationAnalysis\": {\n \"summaryPrompt\": null,\n \"autoDetectProblems\": false,\n \"problemDetectionPrompt\": null,\n \"problemDetectionInstructions\": null,\n \"analysisModel\": null\n },\n \"privacyConfig\": {\n \"enableRecording\": false,\n \"getRecordingConsent\": false,\n \"recordingConsentText\": null,\n \"stopSecs\": 1,\n \"preSpeechMs\": 1,\n \"maxDurationSecs\": 1\n },\n \"turnAnalyzerConfig\": {\n \"url\": \"<string>\",\n \"modelPath\": \"<string>\"\n },\n \"guardrailsConfig\": {\n \"guardrails_enabled\": false,\n \"custom_rules_enabled\": false,\n \"rules\": [],\n \"refuse_message\": \"I'm sorry, I can't help with that.\",\n \"max_regenerate_retries\": 2,\n \"regenerate_wait_message\": \"One moment, please.\",\n \"classifier_enabled\": false,\n \"classifier_provider\": \"<string>\",\n \"classifier_model\": \"<string>\",\n \"input_config\": {\n \"enabled\": false,\n \"normalize\": true,\n \"detect_injection\": true,\n \"detect_weird_input\": true,\n \"run_classifier\": true,\n \"refuse_message\": \"I'm sorry, I can't help with that.\",\n \"max_input_chars\": 8000\n }\n },\n \"piiRedactionConfig\": {\n \"enabled\": false,\n \"maskEmail\": true,\n \"maskPhone\": true,\n \"maskPaymentCard\": true,\n \"maskNationalId\": true,\n \"maskIban\": true,\n \"customRules\": []\n },\n \"routingLlmConfig\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"apiKey\": \"<string>\"\n },\n \"extractionLlmConfig\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"apiKey\": \"<string>\"\n },\n \"backgroundSoundUrl\": null,\n \"syncSource\": {\n \"url\": \"<string>\",\n \"apiKey\": \"<string>\",\n \"syncedAt\": \"2023-11-07T05:31:56Z\"\n },\n \"testVariables\": {}\n },\n \"commitMessage\": \"<string>\",\n \"commitDescription\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"message": "<string>",
"result": {
"agent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"config": {
"llmConfig": {
"provider": "<string>",
"model": "<string>",
"systemPrompt": "<string>",
"baseUrl": "<string>",
"apiKey": "<string>",
"firstMessage": null,
"firstMessageMode": "assistant-waits-for-user",
"disableInterruptionsDuringFirstMessage": false,
"maxTokens": 1000,
"maxContextWindow": 5000512,
"temperature": 0.7,
"tools": [],
"additionalSettings": {},
"retryExhaustionMessage": "<string>",
"farewellMessage": "<string>"
},
"ttsConfig": {
"provider": "<string>",
"voiceId": "<string>",
"model": null,
"language": "multi",
"baseUrl": "<string>",
"apiKey": "<string>",
"additionalSettings": {},
"startSpeakingPlan": {
"waitSeconds": 0.4,
"backgroundNoisePhrases": [
"<string>"
]
},
"stopSpeakingPlan": {
"numberOfWords": 1,
"voiceSeconds": 0.4,
"backOffSeconds": 0.4,
"acknowledgementPhrases": [
"<string>"
],
"interruptionPhrases": [
"<string>"
]
},
"textSubstitutions": [
{
"pattern": "<string>",
"replacement": "<string>",
"caseInsensitive": true
}
],
"speechNormalization": {
"emails": true,
"urls": true,
"emojis": true,
"phoneNumbers": false,
"identityNumbers": false,
"generalNumbers": false,
"advanced": {
"numbers": false,
"money": false,
"dates": false,
"times": false,
"percentages": false,
"fractions": false,
"units": false,
"ordinals": false,
"abbreviations": false,
"iban": false,
"symbols": false
}
},
"normalizationPrompt": "<string>"
},
"sttConfig": {
"provider": "<string>",
"model": null,
"language": "multi",
"baseUrl": "<string>",
"apiKey": "<string>",
"additionalSettings": {},
"confidenceReask": {
"enabled": false,
"threshold": 0.3,
"reduction": "min",
"disableOnDigitNodes": true,
"reaskMode": "phrase",
"reaskPhrases": null,
"maxConsecutiveReasks": 2
}
},
"complianceConfig": {
"pciDss": false,
"mifidIi": false,
"euAiAct": false,
"soc2": false
},
"callTimeoutSettings": {
"silenceTimeout": 0,
"maximumDuration": 600,
"checkInMessage": null,
"closureMessage": null,
"maxRetries": 2,
"silenceTimeoutPrompt": null,
"maxDurationEndCall": null,
"dynamicWait": null
},
"voicemailDetection": {
"enabled": false,
"messageMode": "none",
"staticMessage": null,
"voicemailResponseDelay": 2
},
"dtmfConfig": {
"enabled": false,
"timeout": 2,
"terminationDigit": "#",
"prefix": "DTMF: "
},
"postConversationAnalysis": {
"summaryPrompt": null,
"autoDetectProblems": false,
"problemDetectionPrompt": null,
"problemDetectionInstructions": null,
"analysisModel": null
},
"privacyConfig": {
"enableRecording": false,
"getRecordingConsent": false,
"recordingConsentText": null,
"stopSecs": 1,
"preSpeechMs": 1,
"maxDurationSecs": 1
},
"turnAnalyzerConfig": {
"provider": "local",
"url": "<string>",
"modelPath": "<string>"
},
"guardrailsConfig": {
"guardrails_enabled": false,
"custom_rules_enabled": false,
"rules": [],
"refuse_message": "I'm sorry, I can't help with that.",
"max_regenerate_retries": 2,
"regenerate_wait_message": "One moment, please.",
"classifier_enabled": false,
"classifier_provider": "<string>",
"classifier_model": "<string>",
"input_config": {
"enabled": false,
"normalize": true,
"detect_injection": true,
"detect_weird_input": true,
"run_classifier": true,
"refuse_message": "I'm sorry, I can't help with that.",
"max_input_chars": 8000
}
},
"piiRedactionConfig": {
"enabled": false,
"maskEmail": true,
"maskPhone": true,
"maskPaymentCard": true,
"maskNationalId": true,
"maskIban": true,
"customRules": []
},
"routingLlmConfig": {
"provider": "<string>",
"model": "<string>",
"baseUrl": "<string>",
"apiKey": "<string>"
},
"extractionLlmConfig": {
"provider": "<string>",
"model": "<string>",
"baseUrl": "<string>",
"apiKey": "<string>"
},
"backgroundSoundUrl": null,
"syncSource": {
"url": "<string>",
"apiKey": "<string>",
"syncedAt": "2023-11-07T05:31:56Z"
},
"testVariables": {}
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"entityType": "workflow",
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isImported": false
}
}
}
}{
"success": false,
"data": {
"message": "<string>",
"result": "<unknown>"
}
}{
"success": false,
"data": {
"message": "<string>",
"result": "<unknown>"
}
}{
"success": false,
"data": {
"message": "<string>",
"result": "<unknown>"
}
}{
"success": false,
"data": {
"message": "<string>",
"result": "<unknown>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Agent ID
Body
application/json