Agents
Update agent
Update a agent
PUT
/
api
/
v1
/
agents
/
{id}
Update agent
curl --request PUT \
--url https://api.evoai.app/api/v1/agents/{id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>'import requests
url = "https://api.evoai.app/api/v1/agents/{id}"
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'}
};
fetch('https://api.evoai.app/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.evoai.app/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_HTTPHEADER => [
"Content-Type: application/json",
"api_access_token: <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"
"net/http"
"io"
)
func main() {
url := "https://api.evoai.app/api/v1/agents/{id}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("api_access_token", "<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://api.evoai.app/api/v1/agents/{id}")
.header("api_access_token", "<api-key>")
.header("Content-Type", "application/json")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evoai.app/api/v1/agents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["api_access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "your-agent-id",
"account_id": "your-account-id",
"name": "Customer Support Agent (Updated)",
"description": "Updated AI agent for customer support",
"type": "llm",
"model": "your-model-name",
"api_key_id": "your-api-key-id",
"instruction": "You are an updated helpful customer support assistant...",
"card_url": "",
"folder_id": "your-folder-id",
"config": {},
"role": "assistant",
"goal": "Help customers resolve their issues efficiently",
"evolution_bot_id": "",
"evolution_bot_sync": false,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-16T14:00:00Z"
},
"meta": {
"timestamp": "2024-01-16T14:00:00Z"
}
}{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Invalid input data"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}",
"method": "PUT"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing authentication token"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}",
"method": "PUT"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "Insufficient permissions to perform this action"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}",
"method": "PUT"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Agent not found"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}",
"method": "PUT"
}
}{
"success": false,
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}",
"method": "PUT"
}
}⌘I
Update agent
curl --request PUT \
--url https://api.evoai.app/api/v1/agents/{id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>'import requests
url = "https://api.evoai.app/api/v1/agents/{id}"
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'}
};
fetch('https://api.evoai.app/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.evoai.app/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_HTTPHEADER => [
"Content-Type: application/json",
"api_access_token: <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"
"net/http"
"io"
)
func main() {
url := "https://api.evoai.app/api/v1/agents/{id}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("api_access_token", "<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://api.evoai.app/api/v1/agents/{id}")
.header("api_access_token", "<api-key>")
.header("Content-Type", "application/json")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evoai.app/api/v1/agents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["api_access_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "your-agent-id",
"account_id": "your-account-id",
"name": "Customer Support Agent (Updated)",
"description": "Updated AI agent for customer support",
"type": "llm",
"model": "your-model-name",
"api_key_id": "your-api-key-id",
"instruction": "You are an updated helpful customer support assistant...",
"card_url": "",
"folder_id": "your-folder-id",
"config": {},
"role": "assistant",
"goal": "Help customers resolve their issues efficiently",
"evolution_bot_id": "",
"evolution_bot_sync": false,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-16T14:00:00Z"
},
"meta": {
"timestamp": "2024-01-16T14:00:00Z"
}
}{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Invalid input data"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}",
"method": "PUT"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing authentication token"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}",
"method": "PUT"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "Insufficient permissions to perform this action"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}",
"method": "PUT"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Agent not found"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}",
"method": "PUT"
}
}{
"success": false,
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"path": "/api/v1/agents/{id}",
"method": "PUT"
}
}