Skip to main content
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>"
}
]
}

Authorizations

x-api-key
string
header
required

Path Parameters

agent_id
string<uuid>
required

Body

application/json
name
string | null

New name for the agent

description
string | null

New description for the agent

configuration
AgentConfig · object | null

Updated configuration settings

status
string | null

New status for the agent

avatar_url
string | null

New avatar URL for the agent

metadata
Metadata · object | null

Updated metadata for the agent

Response

Successful Response

name
string
required

Name of the agent

configuration
AgentConfig · object
required

Agent-specific configuration settings

id
string<uuid>
required

Unique identifier for the agent

template_id
string<uuid>
required

ID of the template this agent was created from

organization_id
string<uuid>
required

ID of the organization that owns this agent

status
string
required

Current status of the agent (active, inactive, etc)

created_at
string
required

When the agent was created

updated_at
string
required

When the agent was last updated

description
string | null

Description of the agent's purpose and capabilities

avatar_url
string | null

URL of the agent's avatar image

metadata
Metadata · object

Additional metadata for the agent

files
AgentFile · object[]

List of files associated with this agent

team_id
string[] | null

List of team IDs this agent belongs to

completed_flows_count
integer
default:0

Count of successfully completed flow executions

pending_flows_count
integer
default:0

Count of pending and running flow executions

bot_sub
string | null

Bot subscriber ID used for executing flows

platform_app_installation_id
string | null

Platform app installation ID

platform_app_id
string | null

Platform app ID

platform_app_slug
string | null

Platform app slug