Duplicate agent
curl --request POST \
--url https://api.nedzo.ai/v1/agents/{agentId}/duplicate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nedzo.ai/v1/agents/{agentId}/duplicate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nedzo.ai/v1/agents/{agentId}/duplicate', 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.nedzo.ai/v1/agents/{agentId}/duplicate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.nedzo.ai/v1/agents/{agentId}/duplicate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nedzo.ai/v1/agents/{agentId}/duplicate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nedzo.ai/v1/agents/{agentId}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{ "id": "6f1d2e3c-4b5a-4968-8776-5a4b3c2d1e0f", "warnings": [] }
Agents
Duplicate agent
Copy an agent into a new agent in the same workspace.
POST
/
agents
/
{agentId}
/
duplicate
Duplicate agent
curl --request POST \
--url https://api.nedzo.ai/v1/agents/{agentId}/duplicate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nedzo.ai/v1/agents/{agentId}/duplicate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nedzo.ai/v1/agents/{agentId}/duplicate', 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.nedzo.ai/v1/agents/{agentId}/duplicate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.nedzo.ai/v1/agents/{agentId}/duplicate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nedzo.ai/v1/agents/{agentId}/duplicate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nedzo.ai/v1/agents/{agentId}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{ "id": "6f1d2e3c-4b5a-4968-8776-5a4b3c2d1e0f", "warnings": [] }
This endpoint is for the VIP plan only. Other plans get a
403. See Plan access.The copy lists the same knowledge, but it cannot answer from it yet. Detach and attach each knowledge item on the copy. See Agent knowledge.
Path Parameters
string
required
The agent to copy.
{ "id": "6f1d2e3c-4b5a-4968-8776-5a4b3c2d1e0f", "warnings": [] }
warnings lists the parts that were not copied. Get the new agent with Get agent.
Errors
| Status | When |
|---|---|
403 | The agent has HIPAA on and the account has no HIPAA add-on. |
404 | The agent is not in your API key’s scope. |
Was this page helpful?
