Update Agent
curl --request PUT \
--url https://svalync.com/api/agents/update \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"name": "<string>",
"welcomeMessage": "<string>",
"task": "<string>",
"voice": "<string>",
"language": "<string>",
"telephonyProvider": "<string>",
"callTermination": 123,
"hangupMessage": "<string>"
}
'import requests
url = "https://svalync.com/api/agents/update"
payload = {
"name": "<string>",
"welcomeMessage": "<string>",
"task": "<string>",
"voice": "<string>",
"language": "<string>",
"telephonyProvider": "<string>",
"callTermination": 123,
"hangupMessage": "<string>"
}
headers = {
"x-api-key": "<x-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': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
welcomeMessage: '<string>',
task: '<string>',
voice: '<string>',
language: '<string>',
telephonyProvider: '<string>',
callTermination: 123,
hangupMessage: '<string>'
})
};
fetch('https://svalync.com/api/agents/update', 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://svalync.com/api/agents/update",
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>',
'welcomeMessage' => '<string>',
'task' => '<string>',
'voice' => '<string>',
'language' => '<string>',
'telephonyProvider' => '<string>',
'callTermination' => 123,
'hangupMessage' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-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://svalync.com/api/agents/update"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"welcomeMessage\": \"<string>\",\n \"task\": \"<string>\",\n \"voice\": \"<string>\",\n \"language\": \"<string>\",\n \"telephonyProvider\": \"<string>\",\n \"callTermination\": 123,\n \"hangupMessage\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<x-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://svalync.com/api/agents/update")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"welcomeMessage\": \"<string>\",\n \"task\": \"<string>\",\n \"voice\": \"<string>\",\n \"language\": \"<string>\",\n \"telephonyProvider\": \"<string>\",\n \"callTermination\": 123,\n \"hangupMessage\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://svalync.com/api/agents/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"welcomeMessage\": \"<string>\",\n \"task\": \"<string>\",\n \"voice\": \"<string>\",\n \"language\": \"<string>\",\n \"telephonyProvider\": \"<string>\",\n \"callTermination\": 123,\n \"hangupMessage\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"response": [
{
"success": true,
"data": {
"id": "<string>",
"name": "<string>",
"welcomeMessage": "<string>",
"task": "<string>",
"voice": "<string>",
"language": "<string>",
"telephonyProvider": "<string>",
"callTermination": 123,
"hangupMessage": "<string>",
"apiTool": "<any>",
"knowledgeBase": "<string>",
"workflow": "<string>"
}
}
]
}Agent
Update Agent
Update an existing agent for handling specific tasks and interactions within the system.
PUT
/
agents
/
update
Update Agent
curl --request PUT \
--url https://svalync.com/api/agents/update \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"name": "<string>",
"welcomeMessage": "<string>",
"task": "<string>",
"voice": "<string>",
"language": "<string>",
"telephonyProvider": "<string>",
"callTermination": 123,
"hangupMessage": "<string>"
}
'import requests
url = "https://svalync.com/api/agents/update"
payload = {
"name": "<string>",
"welcomeMessage": "<string>",
"task": "<string>",
"voice": "<string>",
"language": "<string>",
"telephonyProvider": "<string>",
"callTermination": 123,
"hangupMessage": "<string>"
}
headers = {
"x-api-key": "<x-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': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
welcomeMessage: '<string>',
task: '<string>',
voice: '<string>',
language: '<string>',
telephonyProvider: '<string>',
callTermination: 123,
hangupMessage: '<string>'
})
};
fetch('https://svalync.com/api/agents/update', 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://svalync.com/api/agents/update",
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>',
'welcomeMessage' => '<string>',
'task' => '<string>',
'voice' => '<string>',
'language' => '<string>',
'telephonyProvider' => '<string>',
'callTermination' => 123,
'hangupMessage' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-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://svalync.com/api/agents/update"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"welcomeMessage\": \"<string>\",\n \"task\": \"<string>\",\n \"voice\": \"<string>\",\n \"language\": \"<string>\",\n \"telephonyProvider\": \"<string>\",\n \"callTermination\": 123,\n \"hangupMessage\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<x-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://svalync.com/api/agents/update")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"welcomeMessage\": \"<string>\",\n \"task\": \"<string>\",\n \"voice\": \"<string>\",\n \"language\": \"<string>\",\n \"telephonyProvider\": \"<string>\",\n \"callTermination\": 123,\n \"hangupMessage\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://svalync.com/api/agents/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"welcomeMessage\": \"<string>\",\n \"task\": \"<string>\",\n \"voice\": \"<string>\",\n \"language\": \"<string>\",\n \"telephonyProvider\": \"<string>\",\n \"callTermination\": 123,\n \"hangupMessage\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"response": [
{
"success": true,
"data": {
"id": "<string>",
"name": "<string>",
"welcomeMessage": "<string>",
"task": "<string>",
"voice": "<string>",
"language": "<string>",
"telephonyProvider": "<string>",
"callTermination": 123,
"hangupMessage": "<string>",
"apiTool": "<any>",
"knowledgeBase": "<string>",
"workflow": "<string>"
}
}
]
}Authorization
Your Api Key
Params
The unique id for the agent being updated.
Body
The name of the agent to be created.
The welcome message to be delivered by the agent.
The specific task the agent is responsible for.
The voice to be used by the agent for communication.
The language the agent will use for communication.
The telephony provider to be used for the agent’s calls.
The conditions under which the call will be terminated in seconds.
The message to be delivered when the call is terminated.
Response
Show properties
Show properties
Indicates if the request was successful.
The created agent object containing all the input fields.
Show properties
Show properties
Unique identifier for the created agent.
The name assigned to the agent.
The message the agent speaks when a call is connected.
The purpose or function of the agent.
The voice setting configured for the agent.
The language the agent uses for communication.
The provider used for handling incoming and outgoing calls.
The condition or duration that triggers call termination.
The message played when the agent initiates a call hangup.
Configuration details for the API tool integrated with the agent.
Reference to the knowledge base associated with the agent.
The workflow process triggered after a call is completed.
⌘I