Skip to main content
POST
/
test_framework
/
v2
/
aiagents
/
{id}
/
duplicate
/
Duplicate an AI voice agent
curl --request POST \
  --url https://api.cekura.ai/test_framework/v2/aiagents/{id}/duplicate/ \
  --header 'Content-Type: application/json' \
  --header 'X-CEKURA-API-KEY: <api-key>' \
  --data '
{
  "copy_scenarios": true
}
'
import requests

url = "https://api.cekura.ai/test_framework/v2/aiagents/{id}/duplicate/"

payload = { "copy_scenarios": True }
headers = {
"X-CEKURA-API-KEY": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-CEKURA-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({copy_scenarios: true})
};

fetch('https://api.cekura.ai/test_framework/v2/aiagents/{id}/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.cekura.ai/test_framework/v2/aiagents/{id}/duplicate/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'copy_scenarios' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-CEKURA-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://api.cekura.ai/test_framework/v2/aiagents/{id}/duplicate/"

payload := strings.NewReader("{\n \"copy_scenarios\": true\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-CEKURA-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.post("https://api.cekura.ai/test_framework/v2/aiagents/{id}/duplicate/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"copy_scenarios\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.cekura.ai/test_framework/v2/aiagents/{id}/duplicate/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"copy_scenarios\": true\n}"

response = http.request(request)
puts response.read_body
{
  "description": "<string>",
  "id": 123,
  "name": "<string>",
  "project": 123,
  "language": "en",
  "telephony": {
    "phone_number": "<string>",
    "inbound": false,
    "sip_uri": "<string>",
    "sip_auth": "<unknown>",
    "websocket_url": "<string>",
    "websocket_auth": "<unknown>",
    "outbound_numbers": [
      "<string>"
    ]
  },
  "provider": {
    "agent_id": "<string>",
    "credentials": {
      "config": {
        "public_key": "<string>",
        "trigger_url": "<string>"
      }
    },
    "chat_agent_details": {
      "config": {
        "agent_id": "<string>"
      }
    },
    "auto_dial_outbound": true,
    "auto_import_calls": true,
    "auto_sync_prompt": true,
    "send_post_conversation_metadata": true
  },
  "agent_speaks_first": true,
  "knowledge_base_files": [
    {
      "agent": 123,
      "id": 123,
      "file_url": "<string>",
      "file_name": "<string>",
      "file_type": "<string>",
      "file_size": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "enabled_personalities": [
    123
  ],
  "webhook_url": "<string>",
  "webhook_secret_configured": "<string>",
  "mock_tools": [
    {
      "id": 123,
      "name": "<string>",
      "description": "<string>",
      "mock_data": "<unknown>",
      "served_via": {
        "url": "<string>",
        "mock_index": 123
      }
    }
  ],
  "mock_tools_enabled": true,
  "mock_tools_provider": "<string>",
  "dynamic_variables": [
    {
      "id": 123,
      "name": "<string>",
      "description": "<string>"
    }
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}
{
"field_name": [
"<string>"
]
}

Authorizations

X-CEKURA-API-KEY
string
header
required

API Key Authentication. It should be included in the header of each request.

Path Parameters

id
integer
required

A unique integer value identifying this ai agent.

Body

copy_scenarios
boolean

If true, scenarios will be copied Example: true or fase

Response

description
string
required

A detailed description of what this agent does and how it should interact Example:

AI agent for handling customer support inquiries and resolving technical issues
id
integer
read-only

Agent ID. Example: 2142

name
string

Agent name. Optional when configure_from_provider is set — it's fetched from the provider.

Maximum string length: 255
project
integer

The project this agent belongs to

language
enum<string>
default:en

The primary language this agent uses for communication (e.g. 'en' for English)

  • af - Afrikaans
  • ar - Arabic
  • bn - Bengali
  • bg - Bulgarian
  • zh - Chinese Simplified
  • cs - Czech
  • da - Danish
  • nl - Dutch
  • en - English
  • et - Estonian
  • fi - Finnish
  • fr - French
  • de - German
  • el - Greek
  • gu - Gujarati
  • hi - Hindi
  • he - Hebrew
  • hu - Hungarian
  • id - Indonesian
  • it - Italian
  • ja - Japanese
  • kn - Kannada
  • ko - Korean
  • ms - Malay
  • ml - Malayalam
  • mr - Marathi
  • multi - Multilingual
  • no - Norwegian
  • pl - Polish
  • pa - Punjabi
  • pt - Portuguese
  • ro - Romanian
  • ru - Russian
  • sk - Slovak
  • es - Spanish
  • sv - Swedish
  • th - Thai
  • tr - Turkish
  • tl - Tagalog
  • ta - Tamil
  • te - Telugu
  • uk - Ukrainian
  • vi - Vietnamese
Available options:
af,
ar,
bn,
bg,
zh,
cs,
da,
nl,
en,
et,
fi,
fr,
de,
el,
gu,
hi,
he,
hu,
id,
it,
ja,
kn,
ko,
ms,
ml,
mr,
multi,
no,
pl,
pa,
pt,
ro,
ru,
sk,
es,
sv,
th,
tr,
tl,
ta,
te,
uk,
vi
telephony
object

Phone and SIP/websocket channel configuration.

provider
object

AI platform integration (provider type, agent id, credential status, chat config).

agent_speaks_first
boolean | null

True = agent speaks first; False = test user speaks first; null = auto-detect.

knowledge_base_files
object[]
read-only

Knowledge base files attached to the agent.

enabled_personalities
integer[]
read-only

Personality profiles enabled for this agent Example: [1, 2, 3]

webhook_url
string<uri>

Webhook URL for this agent. When set, overrides the project-level webhook URL for events from this agent.

webhook_secret_configured
string
read-only
mock_tools
object[]
read-only

Mock tools registered on the agent, each with its mock data and runtime access (served_via).

mock_tools_enabled
boolean
read-only

Whether mock-tool mode is currently active on the provider. Default false.

mock_tools_provider
string | null
read-only

Provider the mock tools were fetched from (vapi, retell, elevenlabs, custom). Null until auto-fetch has been run.

dynamic_variables
object[]
read-only

Dynamic variable definitions for the agent, ordered by name.

created_at
string<date-time>
read-only

Timestamp when the agent was created Example: "2021-01-01T00:00:00Z"

updated_at
string<date-time>
read-only

Timestamp when the agent was last updated Example: "2021-01-01T00:00:00Z"