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
string
required
Your Api Key
Params
string
required
The unique id for the agent being updated.
Body
string
required
The name of the agent to be created.
string
required
The welcome message to be delivered by the agent.
string
required
The specific task the agent is responsible for.
string
required
The voice to be used by the agent for communication.
string
required
The language the agent will use for communication.
string
required
The telephony provider to be used for the agent’s calls.
number
required
The conditions under which the call will be terminated in seconds.
string
required
The message to be delivered when the call is terminated.
Response
array
Show properties
Show properties
boolean
Indicates if the request was successful.
object
The created agent object containing all the input fields.
Show properties
Show properties
string
Unique identifier for the created agent.
string
The name assigned to the agent.
string
The message the agent speaks when a call is connected.
string
The purpose or function of the agent.
string
The voice setting configured for the agent.
string
The language the agent uses for communication.
string
The provider used for handling incoming and outgoing calls.
integer
The condition or duration that triggers call termination.
string
The message played when the agent initiates a call hangup.
json
Configuration details for the API tool integrated with the agent.
string
Reference to the knowledge base associated with the agent.
string
The workflow process triggered after a call is completed.
⌘I