Update agent
curl --request PUT \
--url https://api.elemente.ai/api/v1/agents/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"leadQualification": "<string>",
"functionality": "interactive",
"lastname": "Doe",
"imageURL": "https://example.com/image.jpg",
"phone": "+1234567890",
"isInbound": false,
"workspace": false,
"id": "<string>",
"agentType": "AI",
"roleText": "Customer Support",
"capabilities": [],
"inboundCapability": "answer",
"jobDescriptions": "Customer Support",
"baseInstructions": "Welcome to our customer support!",
"temperature": "0.7",
"modelProvider": "OpenAI",
"modelName": "gpt-4o",
"actions": [
"<string>"
],
"globalActions": [
"<string>"
],
"skillId": "Customer Support Representative",
"skills": [
"<string>"
],
"language": "en-US",
"voiceStability": 0.5,
"voiceSpeed": 1.5,
"voiceId": "1234567890",
"optimizeStreamingLatency": true,
"sendFillerWords": false,
"sendInitialMessage": true,
"fillerWords": [
"Got it.",
"Understood",
"Awesome"
],
"cutoffResponses": [
"Can you repeat that?",
"Sorry, I didn't get that.",
"I didn't understand that.",
"Can you talk a little bit slow?"
],
"enableCutoffResponses": true,
"endCallOnGoodBye": true,
"goodByePhrases": [
"Goodbye",
"Talk to you later"
],
"allowedIdleTime": 10,
"checkHumanPresence": true,
"checkHumanPresenceCount": 5,
"allowInterruption": true,
"interruptionSensitivity": "high",
"name": "John Doe",
"nickname": "John Seller"
}
EOFimport requests
url = "https://api.elemente.ai/api/v1/agents/{id}"
payload = {
"leadQualification": "<string>",
"functionality": "interactive",
"lastname": "Doe",
"imageURL": "https://example.com/image.jpg",
"phone": "+1234567890",
"isInbound": False,
"workspace": False,
"id": "<string>",
"agentType": "AI",
"roleText": "Customer Support",
"capabilities": [],
"inboundCapability": "answer",
"jobDescriptions": "Customer Support",
"baseInstructions": "Welcome to our customer support!",
"temperature": "0.7",
"modelProvider": "OpenAI",
"modelName": "gpt-4o",
"actions": ["<string>"],
"globalActions": ["<string>"],
"skillId": "Customer Support Representative",
"skills": ["<string>"],
"language": "en-US",
"voiceStability": 0.5,
"voiceSpeed": 1.5,
"voiceId": "1234567890",
"optimizeStreamingLatency": True,
"sendFillerWords": False,
"sendInitialMessage": True,
"fillerWords": ["Got it.", "Understood", "Awesome"],
"cutoffResponses": ["Can you repeat that?", "Sorry, I didn't get that.", "I didn't understand that.", "Can you talk a little bit slow?"],
"enableCutoffResponses": True,
"endCallOnGoodBye": True,
"goodByePhrases": ["Goodbye", "Talk to you later"],
"allowedIdleTime": 10,
"checkHumanPresence": True,
"checkHumanPresenceCount": 5,
"allowInterruption": True,
"interruptionSensitivity": "high",
"name": "John Doe",
"nickname": "John Seller"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
leadQualification: '<string>',
functionality: 'interactive',
lastname: 'Doe',
imageURL: 'https://example.com/image.jpg',
phone: '+1234567890',
isInbound: false,
workspace: false,
id: '<string>',
agentType: 'AI',
roleText: 'Customer Support',
capabilities: [],
inboundCapability: 'answer',
jobDescriptions: 'Customer Support',
baseInstructions: 'Welcome to our customer support!',
temperature: '0.7',
modelProvider: 'OpenAI',
modelName: 'gpt-4o',
actions: ['<string>'],
globalActions: ['<string>'],
skillId: 'Customer Support Representative',
skills: ['<string>'],
language: 'en-US',
voiceStability: 0.5,
voiceSpeed: 1.5,
voiceId: '1234567890',
optimizeStreamingLatency: true,
sendFillerWords: false,
sendInitialMessage: true,
fillerWords: ['Got it.', 'Understood', 'Awesome'],
cutoffResponses: [
'Can you repeat that?',
'Sorry, I didn\'t get that.',
'I didn\'t understand that.',
'Can you talk a little bit slow?'
],
enableCutoffResponses: true,
endCallOnGoodBye: true,
goodByePhrases: ['Goodbye', 'Talk to you later'],
allowedIdleTime: 10,
checkHumanPresence: true,
checkHumanPresenceCount: 5,
allowInterruption: true,
interruptionSensitivity: 'high',
name: 'John Doe',
nickname: 'John Seller'
})
};
fetch('https://api.elemente.ai/api/v1/agents/{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.elemente.ai/api/v1/agents/{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([
'leadQualification' => '<string>',
'functionality' => 'interactive',
'lastname' => 'Doe',
'imageURL' => 'https://example.com/image.jpg',
'phone' => '+1234567890',
'isInbound' => false,
'workspace' => false,
'id' => '<string>',
'agentType' => 'AI',
'roleText' => 'Customer Support',
'capabilities' => [
],
'inboundCapability' => 'answer',
'jobDescriptions' => 'Customer Support',
'baseInstructions' => 'Welcome to our customer support!',
'temperature' => '0.7',
'modelProvider' => 'OpenAI',
'modelName' => 'gpt-4o',
'actions' => [
'<string>'
],
'globalActions' => [
'<string>'
],
'skillId' => 'Customer Support Representative',
'skills' => [
'<string>'
],
'language' => 'en-US',
'voiceStability' => 0.5,
'voiceSpeed' => 1.5,
'voiceId' => '1234567890',
'optimizeStreamingLatency' => true,
'sendFillerWords' => false,
'sendInitialMessage' => true,
'fillerWords' => [
'Got it.',
'Understood',
'Awesome'
],
'cutoffResponses' => [
'Can you repeat that?',
'Sorry, I didn\'t get that.',
'I didn\'t understand that.',
'Can you talk a little bit slow?'
],
'enableCutoffResponses' => true,
'endCallOnGoodBye' => true,
'goodByePhrases' => [
'Goodbye',
'Talk to you later'
],
'allowedIdleTime' => 10,
'checkHumanPresence' => true,
'checkHumanPresenceCount' => 5,
'allowInterruption' => true,
'interruptionSensitivity' => 'high',
'name' => 'John Doe',
'nickname' => 'John Seller'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://api.elemente.ai/api/v1/agents/{id}"
payload := strings.NewReader("{\n \"leadQualification\": \"<string>\",\n \"functionality\": \"interactive\",\n \"lastname\": \"Doe\",\n \"imageURL\": \"https://example.com/image.jpg\",\n \"phone\": \"+1234567890\",\n \"isInbound\": false,\n \"workspace\": false,\n \"id\": \"<string>\",\n \"agentType\": \"AI\",\n \"roleText\": \"Customer Support\",\n \"capabilities\": [],\n \"inboundCapability\": \"answer\",\n \"jobDescriptions\": \"Customer Support\",\n \"baseInstructions\": \"Welcome to our customer support!\",\n \"temperature\": \"0.7\",\n \"modelProvider\": \"OpenAI\",\n \"modelName\": \"gpt-4o\",\n \"actions\": [\n \"<string>\"\n ],\n \"globalActions\": [\n \"<string>\"\n ],\n \"skillId\": \"Customer Support Representative\",\n \"skills\": [\n \"<string>\"\n ],\n \"language\": \"en-US\",\n \"voiceStability\": 0.5,\n \"voiceSpeed\": 1.5,\n \"voiceId\": \"1234567890\",\n \"optimizeStreamingLatency\": true,\n \"sendFillerWords\": false,\n \"sendInitialMessage\": true,\n \"fillerWords\": [\n \"Got it.\",\n \"Understood\",\n \"Awesome\"\n ],\n \"cutoffResponses\": [\n \"Can you repeat that?\",\n \"Sorry, I didn't get that.\",\n \"I didn't understand that.\",\n \"Can you talk a little bit slow?\"\n ],\n \"enableCutoffResponses\": true,\n \"endCallOnGoodBye\": true,\n \"goodByePhrases\": [\n \"Goodbye\",\n \"Talk to you later\"\n ],\n \"allowedIdleTime\": 10,\n \"checkHumanPresence\": true,\n \"checkHumanPresenceCount\": 5,\n \"allowInterruption\": true,\n \"interruptionSensitivity\": \"high\",\n \"name\": \"John Doe\",\n \"nickname\": \"John Seller\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.elemente.ai/api/v1/agents/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"leadQualification\": \"<string>\",\n \"functionality\": \"interactive\",\n \"lastname\": \"Doe\",\n \"imageURL\": \"https://example.com/image.jpg\",\n \"phone\": \"+1234567890\",\n \"isInbound\": false,\n \"workspace\": false,\n \"id\": \"<string>\",\n \"agentType\": \"AI\",\n \"roleText\": \"Customer Support\",\n \"capabilities\": [],\n \"inboundCapability\": \"answer\",\n \"jobDescriptions\": \"Customer Support\",\n \"baseInstructions\": \"Welcome to our customer support!\",\n \"temperature\": \"0.7\",\n \"modelProvider\": \"OpenAI\",\n \"modelName\": \"gpt-4o\",\n \"actions\": [\n \"<string>\"\n ],\n \"globalActions\": [\n \"<string>\"\n ],\n \"skillId\": \"Customer Support Representative\",\n \"skills\": [\n \"<string>\"\n ],\n \"language\": \"en-US\",\n \"voiceStability\": 0.5,\n \"voiceSpeed\": 1.5,\n \"voiceId\": \"1234567890\",\n \"optimizeStreamingLatency\": true,\n \"sendFillerWords\": false,\n \"sendInitialMessage\": true,\n \"fillerWords\": [\n \"Got it.\",\n \"Understood\",\n \"Awesome\"\n ],\n \"cutoffResponses\": [\n \"Can you repeat that?\",\n \"Sorry, I didn't get that.\",\n \"I didn't understand that.\",\n \"Can you talk a little bit slow?\"\n ],\n \"enableCutoffResponses\": true,\n \"endCallOnGoodBye\": true,\n \"goodByePhrases\": [\n \"Goodbye\",\n \"Talk to you later\"\n ],\n \"allowedIdleTime\": 10,\n \"checkHumanPresence\": true,\n \"checkHumanPresenceCount\": 5,\n \"allowInterruption\": true,\n \"interruptionSensitivity\": \"high\",\n \"name\": \"John Doe\",\n \"nickname\": \"John Seller\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.elemente.ai/api/v1/agents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"leadQualification\": \"<string>\",\n \"functionality\": \"interactive\",\n \"lastname\": \"Doe\",\n \"imageURL\": \"https://example.com/image.jpg\",\n \"phone\": \"+1234567890\",\n \"isInbound\": false,\n \"workspace\": false,\n \"id\": \"<string>\",\n \"agentType\": \"AI\",\n \"roleText\": \"Customer Support\",\n \"capabilities\": [],\n \"inboundCapability\": \"answer\",\n \"jobDescriptions\": \"Customer Support\",\n \"baseInstructions\": \"Welcome to our customer support!\",\n \"temperature\": \"0.7\",\n \"modelProvider\": \"OpenAI\",\n \"modelName\": \"gpt-4o\",\n \"actions\": [\n \"<string>\"\n ],\n \"globalActions\": [\n \"<string>\"\n ],\n \"skillId\": \"Customer Support Representative\",\n \"skills\": [\n \"<string>\"\n ],\n \"language\": \"en-US\",\n \"voiceStability\": 0.5,\n \"voiceSpeed\": 1.5,\n \"voiceId\": \"1234567890\",\n \"optimizeStreamingLatency\": true,\n \"sendFillerWords\": false,\n \"sendInitialMessage\": true,\n \"fillerWords\": [\n \"Got it.\",\n \"Understood\",\n \"Awesome\"\n ],\n \"cutoffResponses\": [\n \"Can you repeat that?\",\n \"Sorry, I didn't get that.\",\n \"I didn't understand that.\",\n \"Can you talk a little bit slow?\"\n ],\n \"enableCutoffResponses\": true,\n \"endCallOnGoodBye\": true,\n \"goodByePhrases\": [\n \"Goodbye\",\n \"Talk to you later\"\n ],\n \"allowedIdleTime\": 10,\n \"checkHumanPresence\": true,\n \"checkHumanPresenceCount\": 5,\n \"allowInterruption\": true,\n \"interruptionSensitivity\": \"high\",\n \"name\": \"John Doe\",\n \"nickname\": \"John Seller\"\n}"
response = http.request(request)
puts response.read_body{
"id": "1234567890",
"name": "John Doe",
"email": "john.doe@example.com",
"language": "en-US",
"active": true,
"voiceSpeed": 1.5,
"voiceId": "1234567890",
"capabilities": [
"capability1",
"capability2"
],
"jobDescriptions": "Job description 1",
"roleText": "Role text 1",
"actions": [
{
"id": "1234567890",
"name": "Action 1",
"action": "action1",
"parameters": {}
}
],
"skills": [
{
"id": "1234567890",
"name": "Skill 1",
"description": "Description of the skill 1",
"language": "en-US",
"active": true
}
],
"phone": "+1234567890",
"updatedAt": "2022-01-01T00:00:00.000Z",
"createdAt": "2022-01-01T00:00:00.000Z"
}Agent
Update agent
PUT
/
api
/
v1
/
agents
/
{id}
Update agent
curl --request PUT \
--url https://api.elemente.ai/api/v1/agents/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"leadQualification": "<string>",
"functionality": "interactive",
"lastname": "Doe",
"imageURL": "https://example.com/image.jpg",
"phone": "+1234567890",
"isInbound": false,
"workspace": false,
"id": "<string>",
"agentType": "AI",
"roleText": "Customer Support",
"capabilities": [],
"inboundCapability": "answer",
"jobDescriptions": "Customer Support",
"baseInstructions": "Welcome to our customer support!",
"temperature": "0.7",
"modelProvider": "OpenAI",
"modelName": "gpt-4o",
"actions": [
"<string>"
],
"globalActions": [
"<string>"
],
"skillId": "Customer Support Representative",
"skills": [
"<string>"
],
"language": "en-US",
"voiceStability": 0.5,
"voiceSpeed": 1.5,
"voiceId": "1234567890",
"optimizeStreamingLatency": true,
"sendFillerWords": false,
"sendInitialMessage": true,
"fillerWords": [
"Got it.",
"Understood",
"Awesome"
],
"cutoffResponses": [
"Can you repeat that?",
"Sorry, I didn't get that.",
"I didn't understand that.",
"Can you talk a little bit slow?"
],
"enableCutoffResponses": true,
"endCallOnGoodBye": true,
"goodByePhrases": [
"Goodbye",
"Talk to you later"
],
"allowedIdleTime": 10,
"checkHumanPresence": true,
"checkHumanPresenceCount": 5,
"allowInterruption": true,
"interruptionSensitivity": "high",
"name": "John Doe",
"nickname": "John Seller"
}
EOFimport requests
url = "https://api.elemente.ai/api/v1/agents/{id}"
payload = {
"leadQualification": "<string>",
"functionality": "interactive",
"lastname": "Doe",
"imageURL": "https://example.com/image.jpg",
"phone": "+1234567890",
"isInbound": False,
"workspace": False,
"id": "<string>",
"agentType": "AI",
"roleText": "Customer Support",
"capabilities": [],
"inboundCapability": "answer",
"jobDescriptions": "Customer Support",
"baseInstructions": "Welcome to our customer support!",
"temperature": "0.7",
"modelProvider": "OpenAI",
"modelName": "gpt-4o",
"actions": ["<string>"],
"globalActions": ["<string>"],
"skillId": "Customer Support Representative",
"skills": ["<string>"],
"language": "en-US",
"voiceStability": 0.5,
"voiceSpeed": 1.5,
"voiceId": "1234567890",
"optimizeStreamingLatency": True,
"sendFillerWords": False,
"sendInitialMessage": True,
"fillerWords": ["Got it.", "Understood", "Awesome"],
"cutoffResponses": ["Can you repeat that?", "Sorry, I didn't get that.", "I didn't understand that.", "Can you talk a little bit slow?"],
"enableCutoffResponses": True,
"endCallOnGoodBye": True,
"goodByePhrases": ["Goodbye", "Talk to you later"],
"allowedIdleTime": 10,
"checkHumanPresence": True,
"checkHumanPresenceCount": 5,
"allowInterruption": True,
"interruptionSensitivity": "high",
"name": "John Doe",
"nickname": "John Seller"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
leadQualification: '<string>',
functionality: 'interactive',
lastname: 'Doe',
imageURL: 'https://example.com/image.jpg',
phone: '+1234567890',
isInbound: false,
workspace: false,
id: '<string>',
agentType: 'AI',
roleText: 'Customer Support',
capabilities: [],
inboundCapability: 'answer',
jobDescriptions: 'Customer Support',
baseInstructions: 'Welcome to our customer support!',
temperature: '0.7',
modelProvider: 'OpenAI',
modelName: 'gpt-4o',
actions: ['<string>'],
globalActions: ['<string>'],
skillId: 'Customer Support Representative',
skills: ['<string>'],
language: 'en-US',
voiceStability: 0.5,
voiceSpeed: 1.5,
voiceId: '1234567890',
optimizeStreamingLatency: true,
sendFillerWords: false,
sendInitialMessage: true,
fillerWords: ['Got it.', 'Understood', 'Awesome'],
cutoffResponses: [
'Can you repeat that?',
'Sorry, I didn\'t get that.',
'I didn\'t understand that.',
'Can you talk a little bit slow?'
],
enableCutoffResponses: true,
endCallOnGoodBye: true,
goodByePhrases: ['Goodbye', 'Talk to you later'],
allowedIdleTime: 10,
checkHumanPresence: true,
checkHumanPresenceCount: 5,
allowInterruption: true,
interruptionSensitivity: 'high',
name: 'John Doe',
nickname: 'John Seller'
})
};
fetch('https://api.elemente.ai/api/v1/agents/{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.elemente.ai/api/v1/agents/{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([
'leadQualification' => '<string>',
'functionality' => 'interactive',
'lastname' => 'Doe',
'imageURL' => 'https://example.com/image.jpg',
'phone' => '+1234567890',
'isInbound' => false,
'workspace' => false,
'id' => '<string>',
'agentType' => 'AI',
'roleText' => 'Customer Support',
'capabilities' => [
],
'inboundCapability' => 'answer',
'jobDescriptions' => 'Customer Support',
'baseInstructions' => 'Welcome to our customer support!',
'temperature' => '0.7',
'modelProvider' => 'OpenAI',
'modelName' => 'gpt-4o',
'actions' => [
'<string>'
],
'globalActions' => [
'<string>'
],
'skillId' => 'Customer Support Representative',
'skills' => [
'<string>'
],
'language' => 'en-US',
'voiceStability' => 0.5,
'voiceSpeed' => 1.5,
'voiceId' => '1234567890',
'optimizeStreamingLatency' => true,
'sendFillerWords' => false,
'sendInitialMessage' => true,
'fillerWords' => [
'Got it.',
'Understood',
'Awesome'
],
'cutoffResponses' => [
'Can you repeat that?',
'Sorry, I didn\'t get that.',
'I didn\'t understand that.',
'Can you talk a little bit slow?'
],
'enableCutoffResponses' => true,
'endCallOnGoodBye' => true,
'goodByePhrases' => [
'Goodbye',
'Talk to you later'
],
'allowedIdleTime' => 10,
'checkHumanPresence' => true,
'checkHumanPresenceCount' => 5,
'allowInterruption' => true,
'interruptionSensitivity' => 'high',
'name' => 'John Doe',
'nickname' => 'John Seller'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://api.elemente.ai/api/v1/agents/{id}"
payload := strings.NewReader("{\n \"leadQualification\": \"<string>\",\n \"functionality\": \"interactive\",\n \"lastname\": \"Doe\",\n \"imageURL\": \"https://example.com/image.jpg\",\n \"phone\": \"+1234567890\",\n \"isInbound\": false,\n \"workspace\": false,\n \"id\": \"<string>\",\n \"agentType\": \"AI\",\n \"roleText\": \"Customer Support\",\n \"capabilities\": [],\n \"inboundCapability\": \"answer\",\n \"jobDescriptions\": \"Customer Support\",\n \"baseInstructions\": \"Welcome to our customer support!\",\n \"temperature\": \"0.7\",\n \"modelProvider\": \"OpenAI\",\n \"modelName\": \"gpt-4o\",\n \"actions\": [\n \"<string>\"\n ],\n \"globalActions\": [\n \"<string>\"\n ],\n \"skillId\": \"Customer Support Representative\",\n \"skills\": [\n \"<string>\"\n ],\n \"language\": \"en-US\",\n \"voiceStability\": 0.5,\n \"voiceSpeed\": 1.5,\n \"voiceId\": \"1234567890\",\n \"optimizeStreamingLatency\": true,\n \"sendFillerWords\": false,\n \"sendInitialMessage\": true,\n \"fillerWords\": [\n \"Got it.\",\n \"Understood\",\n \"Awesome\"\n ],\n \"cutoffResponses\": [\n \"Can you repeat that?\",\n \"Sorry, I didn't get that.\",\n \"I didn't understand that.\",\n \"Can you talk a little bit slow?\"\n ],\n \"enableCutoffResponses\": true,\n \"endCallOnGoodBye\": true,\n \"goodByePhrases\": [\n \"Goodbye\",\n \"Talk to you later\"\n ],\n \"allowedIdleTime\": 10,\n \"checkHumanPresence\": true,\n \"checkHumanPresenceCount\": 5,\n \"allowInterruption\": true,\n \"interruptionSensitivity\": \"high\",\n \"name\": \"John Doe\",\n \"nickname\": \"John Seller\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.elemente.ai/api/v1/agents/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"leadQualification\": \"<string>\",\n \"functionality\": \"interactive\",\n \"lastname\": \"Doe\",\n \"imageURL\": \"https://example.com/image.jpg\",\n \"phone\": \"+1234567890\",\n \"isInbound\": false,\n \"workspace\": false,\n \"id\": \"<string>\",\n \"agentType\": \"AI\",\n \"roleText\": \"Customer Support\",\n \"capabilities\": [],\n \"inboundCapability\": \"answer\",\n \"jobDescriptions\": \"Customer Support\",\n \"baseInstructions\": \"Welcome to our customer support!\",\n \"temperature\": \"0.7\",\n \"modelProvider\": \"OpenAI\",\n \"modelName\": \"gpt-4o\",\n \"actions\": [\n \"<string>\"\n ],\n \"globalActions\": [\n \"<string>\"\n ],\n \"skillId\": \"Customer Support Representative\",\n \"skills\": [\n \"<string>\"\n ],\n \"language\": \"en-US\",\n \"voiceStability\": 0.5,\n \"voiceSpeed\": 1.5,\n \"voiceId\": \"1234567890\",\n \"optimizeStreamingLatency\": true,\n \"sendFillerWords\": false,\n \"sendInitialMessage\": true,\n \"fillerWords\": [\n \"Got it.\",\n \"Understood\",\n \"Awesome\"\n ],\n \"cutoffResponses\": [\n \"Can you repeat that?\",\n \"Sorry, I didn't get that.\",\n \"I didn't understand that.\",\n \"Can you talk a little bit slow?\"\n ],\n \"enableCutoffResponses\": true,\n \"endCallOnGoodBye\": true,\n \"goodByePhrases\": [\n \"Goodbye\",\n \"Talk to you later\"\n ],\n \"allowedIdleTime\": 10,\n \"checkHumanPresence\": true,\n \"checkHumanPresenceCount\": 5,\n \"allowInterruption\": true,\n \"interruptionSensitivity\": \"high\",\n \"name\": \"John Doe\",\n \"nickname\": \"John Seller\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.elemente.ai/api/v1/agents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"leadQualification\": \"<string>\",\n \"functionality\": \"interactive\",\n \"lastname\": \"Doe\",\n \"imageURL\": \"https://example.com/image.jpg\",\n \"phone\": \"+1234567890\",\n \"isInbound\": false,\n \"workspace\": false,\n \"id\": \"<string>\",\n \"agentType\": \"AI\",\n \"roleText\": \"Customer Support\",\n \"capabilities\": [],\n \"inboundCapability\": \"answer\",\n \"jobDescriptions\": \"Customer Support\",\n \"baseInstructions\": \"Welcome to our customer support!\",\n \"temperature\": \"0.7\",\n \"modelProvider\": \"OpenAI\",\n \"modelName\": \"gpt-4o\",\n \"actions\": [\n \"<string>\"\n ],\n \"globalActions\": [\n \"<string>\"\n ],\n \"skillId\": \"Customer Support Representative\",\n \"skills\": [\n \"<string>\"\n ],\n \"language\": \"en-US\",\n \"voiceStability\": 0.5,\n \"voiceSpeed\": 1.5,\n \"voiceId\": \"1234567890\",\n \"optimizeStreamingLatency\": true,\n \"sendFillerWords\": false,\n \"sendInitialMessage\": true,\n \"fillerWords\": [\n \"Got it.\",\n \"Understood\",\n \"Awesome\"\n ],\n \"cutoffResponses\": [\n \"Can you repeat that?\",\n \"Sorry, I didn't get that.\",\n \"I didn't understand that.\",\n \"Can you talk a little bit slow?\"\n ],\n \"enableCutoffResponses\": true,\n \"endCallOnGoodBye\": true,\n \"goodByePhrases\": [\n \"Goodbye\",\n \"Talk to you later\"\n ],\n \"allowedIdleTime\": 10,\n \"checkHumanPresence\": true,\n \"checkHumanPresenceCount\": 5,\n \"allowInterruption\": true,\n \"interruptionSensitivity\": \"high\",\n \"name\": \"John Doe\",\n \"nickname\": \"John Seller\"\n}"
response = http.request(request)
puts response.read_body{
"id": "1234567890",
"name": "John Doe",
"email": "john.doe@example.com",
"language": "en-US",
"active": true,
"voiceSpeed": 1.5,
"voiceId": "1234567890",
"capabilities": [
"capability1",
"capability2"
],
"jobDescriptions": "Job description 1",
"roleText": "Role text 1",
"actions": [
{
"id": "1234567890",
"name": "Action 1",
"action": "action1",
"parameters": {}
}
],
"skills": [
{
"id": "1234567890",
"name": "Skill 1",
"description": "Description of the skill 1",
"language": "en-US",
"active": true
}
],
"phone": "+1234567890",
"updatedAt": "2022-01-01T00:00:00.000Z",
"createdAt": "2022-01-01T00:00:00.000Z"
}Authorizations
Body
application/json
Input data for updating the AI agent
Response
The updated AI agent
