Update Agent
curl --request PUT \
--url https://agent-studio.thena.ai/api/v1/agents/{agent_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"configuration": {
"communication_style": "FORMAL",
"core_capabilities": [
"enterprise sales",
"negotiation",
"solution selling"
],
"expertise_level": "EXPERT",
"goal": "Drive enterprise sales",
"knowledge_domains": [
"enterprise sales",
"B2B",
"solution architecture"
],
"personality_traits": [
"strategic",
"persuasive",
"consultative"
],
"role": "Senior Sales Representative",
"tone": "Professional"
},
"description": "Updated description",
"metadata": {
"updated_by": "admin"
},
"name": "Updated Sales Assistant",
"status": "inactive"
}
'import requests
url = "https://agent-studio.thena.ai/api/v1/agents/{agent_id}"
payload = {
"configuration": {
"communication_style": "FORMAL",
"core_capabilities": ["enterprise sales", "negotiation", "solution selling"],
"expertise_level": "EXPERT",
"goal": "Drive enterprise sales",
"knowledge_domains": ["enterprise sales", "B2B", "solution architecture"],
"personality_traits": ["strategic", "persuasive", "consultative"],
"role": "Senior Sales Representative",
"tone": "Professional"
},
"description": "Updated description",
"metadata": { "updated_by": "admin" },
"name": "Updated Sales Assistant",
"status": "inactive"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
configuration: {
communication_style: 'FORMAL',
core_capabilities: ['enterprise sales', 'negotiation', 'solution selling'],
expertise_level: 'EXPERT',
goal: 'Drive enterprise sales',
knowledge_domains: ['enterprise sales', 'B2B', 'solution architecture'],
personality_traits: ['strategic', 'persuasive', 'consultative'],
role: 'Senior Sales Representative',
tone: 'Professional'
},
description: 'Updated description',
metadata: {updated_by: 'admin'},
name: 'Updated Sales Assistant',
status: 'inactive'
})
};
fetch('https://agent-studio.thena.ai/api/v1/agents/{agent_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://agent-studio.thena.ai/api/v1/agents/{agent_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([
'configuration' => [
'communication_style' => 'FORMAL',
'core_capabilities' => [
'enterprise sales',
'negotiation',
'solution selling'
],
'expertise_level' => 'EXPERT',
'goal' => 'Drive enterprise sales',
'knowledge_domains' => [
'enterprise sales',
'B2B',
'solution architecture'
],
'personality_traits' => [
'strategic',
'persuasive',
'consultative'
],
'role' => 'Senior Sales Representative',
'tone' => 'Professional'
],
'description' => 'Updated description',
'metadata' => [
'updated_by' => 'admin'
],
'name' => 'Updated Sales Assistant',
'status' => 'inactive'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://agent-studio.thena.ai/api/v1/agents/{agent_id}"
payload := strings.NewReader("{\n \"configuration\": {\n \"communication_style\": \"FORMAL\",\n \"core_capabilities\": [\n \"enterprise sales\",\n \"negotiation\",\n \"solution selling\"\n ],\n \"expertise_level\": \"EXPERT\",\n \"goal\": \"Drive enterprise sales\",\n \"knowledge_domains\": [\n \"enterprise sales\",\n \"B2B\",\n \"solution architecture\"\n ],\n \"personality_traits\": [\n \"strategic\",\n \"persuasive\",\n \"consultative\"\n ],\n \"role\": \"Senior Sales Representative\",\n \"tone\": \"Professional\"\n },\n \"description\": \"Updated description\",\n \"metadata\": {\n \"updated_by\": \"admin\"\n },\n \"name\": \"Updated Sales Assistant\",\n \"status\": \"inactive\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://agent-studio.thena.ai/api/v1/agents/{agent_id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"configuration\": {\n \"communication_style\": \"FORMAL\",\n \"core_capabilities\": [\n \"enterprise sales\",\n \"negotiation\",\n \"solution selling\"\n ],\n \"expertise_level\": \"EXPERT\",\n \"goal\": \"Drive enterprise sales\",\n \"knowledge_domains\": [\n \"enterprise sales\",\n \"B2B\",\n \"solution architecture\"\n ],\n \"personality_traits\": [\n \"strategic\",\n \"persuasive\",\n \"consultative\"\n ],\n \"role\": \"Senior Sales Representative\",\n \"tone\": \"Professional\"\n },\n \"description\": \"Updated description\",\n \"metadata\": {\n \"updated_by\": \"admin\"\n },\n \"name\": \"Updated Sales Assistant\",\n \"status\": \"inactive\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agent-studio.thena.ai/api/v1/agents/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configuration\": {\n \"communication_style\": \"FORMAL\",\n \"core_capabilities\": [\n \"enterprise sales\",\n \"negotiation\",\n \"solution selling\"\n ],\n \"expertise_level\": \"EXPERT\",\n \"goal\": \"Drive enterprise sales\",\n \"knowledge_domains\": [\n \"enterprise sales\",\n \"B2B\",\n \"solution architecture\"\n ],\n \"personality_traits\": [\n \"strategic\",\n \"persuasive\",\n \"consultative\"\n ],\n \"role\": \"Senior Sales Representative\",\n \"tone\": \"Professional\"\n },\n \"description\": \"Updated description\",\n \"metadata\": {\n \"updated_by\": \"admin\"\n },\n \"name\": \"Updated Sales Assistant\",\n \"status\": \"inactive\"\n}"
response = http.request(request)
puts response.read_body{
"bot_sub": "VVYZYKNJ10E18462MAKTHQRW4C142",
"completed_flows_count": 42,
"configuration": {
"language": "English",
"team_size": 5,
"tone": "Professional"
},
"created_at": "2023-01-01T00:00:00Z",
"description": "Customized sales assistant for my team",
"files": [],
"id": "123e4567-e89b-12d3-a456-426614174000",
"metadata": {
"created_by": "admin",
"updated_by": "admin"
},
"name": "My Sales Assistant",
"organization_id": "123e4567-e89b-12d3-a456-426614174000",
"pending_flows_count": 5,
"status": "active",
"team_id": [
"team-1",
"team-2"
],
"template_id": "123e4567-e89b-12d3-a456-426614174000",
"updated_at": "2023-01-01T00:00:00Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Agents
Update Agent
Update an agent.
PUT
/
api
/
v1
/
agents
/
{agent_id}
Update Agent
curl --request PUT \
--url https://agent-studio.thena.ai/api/v1/agents/{agent_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"configuration": {
"communication_style": "FORMAL",
"core_capabilities": [
"enterprise sales",
"negotiation",
"solution selling"
],
"expertise_level": "EXPERT",
"goal": "Drive enterprise sales",
"knowledge_domains": [
"enterprise sales",
"B2B",
"solution architecture"
],
"personality_traits": [
"strategic",
"persuasive",
"consultative"
],
"role": "Senior Sales Representative",
"tone": "Professional"
},
"description": "Updated description",
"metadata": {
"updated_by": "admin"
},
"name": "Updated Sales Assistant",
"status": "inactive"
}
'import requests
url = "https://agent-studio.thena.ai/api/v1/agents/{agent_id}"
payload = {
"configuration": {
"communication_style": "FORMAL",
"core_capabilities": ["enterprise sales", "negotiation", "solution selling"],
"expertise_level": "EXPERT",
"goal": "Drive enterprise sales",
"knowledge_domains": ["enterprise sales", "B2B", "solution architecture"],
"personality_traits": ["strategic", "persuasive", "consultative"],
"role": "Senior Sales Representative",
"tone": "Professional"
},
"description": "Updated description",
"metadata": { "updated_by": "admin" },
"name": "Updated Sales Assistant",
"status": "inactive"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
configuration: {
communication_style: 'FORMAL',
core_capabilities: ['enterprise sales', 'negotiation', 'solution selling'],
expertise_level: 'EXPERT',
goal: 'Drive enterprise sales',
knowledge_domains: ['enterprise sales', 'B2B', 'solution architecture'],
personality_traits: ['strategic', 'persuasive', 'consultative'],
role: 'Senior Sales Representative',
tone: 'Professional'
},
description: 'Updated description',
metadata: {updated_by: 'admin'},
name: 'Updated Sales Assistant',
status: 'inactive'
})
};
fetch('https://agent-studio.thena.ai/api/v1/agents/{agent_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://agent-studio.thena.ai/api/v1/agents/{agent_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([
'configuration' => [
'communication_style' => 'FORMAL',
'core_capabilities' => [
'enterprise sales',
'negotiation',
'solution selling'
],
'expertise_level' => 'EXPERT',
'goal' => 'Drive enterprise sales',
'knowledge_domains' => [
'enterprise sales',
'B2B',
'solution architecture'
],
'personality_traits' => [
'strategic',
'persuasive',
'consultative'
],
'role' => 'Senior Sales Representative',
'tone' => 'Professional'
],
'description' => 'Updated description',
'metadata' => [
'updated_by' => 'admin'
],
'name' => 'Updated Sales Assistant',
'status' => 'inactive'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://agent-studio.thena.ai/api/v1/agents/{agent_id}"
payload := strings.NewReader("{\n \"configuration\": {\n \"communication_style\": \"FORMAL\",\n \"core_capabilities\": [\n \"enterprise sales\",\n \"negotiation\",\n \"solution selling\"\n ],\n \"expertise_level\": \"EXPERT\",\n \"goal\": \"Drive enterprise sales\",\n \"knowledge_domains\": [\n \"enterprise sales\",\n \"B2B\",\n \"solution architecture\"\n ],\n \"personality_traits\": [\n \"strategic\",\n \"persuasive\",\n \"consultative\"\n ],\n \"role\": \"Senior Sales Representative\",\n \"tone\": \"Professional\"\n },\n \"description\": \"Updated description\",\n \"metadata\": {\n \"updated_by\": \"admin\"\n },\n \"name\": \"Updated Sales Assistant\",\n \"status\": \"inactive\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://agent-studio.thena.ai/api/v1/agents/{agent_id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"configuration\": {\n \"communication_style\": \"FORMAL\",\n \"core_capabilities\": [\n \"enterprise sales\",\n \"negotiation\",\n \"solution selling\"\n ],\n \"expertise_level\": \"EXPERT\",\n \"goal\": \"Drive enterprise sales\",\n \"knowledge_domains\": [\n \"enterprise sales\",\n \"B2B\",\n \"solution architecture\"\n ],\n \"personality_traits\": [\n \"strategic\",\n \"persuasive\",\n \"consultative\"\n ],\n \"role\": \"Senior Sales Representative\",\n \"tone\": \"Professional\"\n },\n \"description\": \"Updated description\",\n \"metadata\": {\n \"updated_by\": \"admin\"\n },\n \"name\": \"Updated Sales Assistant\",\n \"status\": \"inactive\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agent-studio.thena.ai/api/v1/agents/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configuration\": {\n \"communication_style\": \"FORMAL\",\n \"core_capabilities\": [\n \"enterprise sales\",\n \"negotiation\",\n \"solution selling\"\n ],\n \"expertise_level\": \"EXPERT\",\n \"goal\": \"Drive enterprise sales\",\n \"knowledge_domains\": [\n \"enterprise sales\",\n \"B2B\",\n \"solution architecture\"\n ],\n \"personality_traits\": [\n \"strategic\",\n \"persuasive\",\n \"consultative\"\n ],\n \"role\": \"Senior Sales Representative\",\n \"tone\": \"Professional\"\n },\n \"description\": \"Updated description\",\n \"metadata\": {\n \"updated_by\": \"admin\"\n },\n \"name\": \"Updated Sales Assistant\",\n \"status\": \"inactive\"\n}"
response = http.request(request)
puts response.read_body{
"bot_sub": "VVYZYKNJ10E18462MAKTHQRW4C142",
"completed_flows_count": 42,
"configuration": {
"language": "English",
"team_size": 5,
"tone": "Professional"
},
"created_at": "2023-01-01T00:00:00Z",
"description": "Customized sales assistant for my team",
"files": [],
"id": "123e4567-e89b-12d3-a456-426614174000",
"metadata": {
"created_by": "admin",
"updated_by": "admin"
},
"name": "My Sales Assistant",
"organization_id": "123e4567-e89b-12d3-a456-426614174000",
"pending_flows_count": 5,
"status": "active",
"team_id": [
"team-1",
"team-2"
],
"template_id": "123e4567-e89b-12d3-a456-426614174000",
"updated_at": "2023-01-01T00:00:00Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Body
application/json
Response
Successful Response