curl --request POST \
--url https://api.cleartalk.ai/agency/agents \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"agentName": "<string>",
"task": "<string>",
"model": "<string>",
"temperature": 123,
"wait_for_greeting": "<string>",
"max_duration": 123,
"selectedVoice": "<string>",
"voiceId": "<string>",
"selectedLanguage": "<string>",
"voiceSpeed": 123,
"interruptionThreshold": 123,
"startTime": "2023-11-07T05:31:56Z",
"isGHL": 123,
"appointmentAgent": 123,
"from_admin": 123,
"knowledgeBases": [
{
"id": 123,
"user_id": 123,
"knowledge_name": "<string>",
"question": "<string>",
"answer": "<string>"
}
],
"questionsData": [
"<unknown>"
],
"pronunciationGuide": [
{
"word": "<string>",
"pronunciation": "<string>",
"caseSensitive": true,
"spaced": true
}
],
"noise_cancellation": false,
"keywords": [
"keyword1",
"keyword2"
],
"timezone": "America/Los_Angeles",
"request_data": {
"name": "John Doe",
"age": 30
},
"start_time": "2024-03-20 12:00:00 -05:00",
"voicemail_message": "Please leave a message after the beep",
"voicemail_action": "hangup",
"retry": {
"wait": 10,
"voicemail_action": "leave_message",
"voicemail_message": "Hello, this is a test message."
},
"record": true,
"webhook_events": [
"queue",
"call",
"latency"
],
"citation_schema_id": "dcad76eb-57b6-4be6-922f-8a5a95e2ffrt",
"analysis_preset": "a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7",
"answered_by_enabled": true,
"available_tags": [
"got_full_name_and_number",
"no_information_provided"
],
"geospatial_dialing": "bd039087-decb-435a-a6e3-ca1ffbf89974",
"precall_dtmf_sequence": "1234567890*#w",
"pool_id": "#1234-5678-9012-3456",
"for_user_id": 123,
"agency_id": 123,
"calendarID": "<string>",
"firstSentence": "<string>",
"calendarName": "<string>",
"customTool": "<string>",
"fromAdmin": true,
"fromAgency": 123,
"background_track": "<string>",
"block_interruptions": 123,
"transferPhoneNumber": [
{
"transfer_number": "<string>",
"transfer_type": "<string>"
}
],
"voiceMail_action": "<string>",
"agentPhones": [
"<string>"
],
"pathwayID": "<string>",
"voicemailDetection": "<string>",
"memory_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"retry_wait": 10,
"retry_voicemail_action": "leave_message",
"retry_voicemail_message": "Hello, this is a test message."
}
'import requests
url = "https://api.cleartalk.ai/agency/agents"
payload = {
"agentName": "<string>",
"task": "<string>",
"model": "<string>",
"temperature": 123,
"wait_for_greeting": "<string>",
"max_duration": 123,
"selectedVoice": "<string>",
"voiceId": "<string>",
"selectedLanguage": "<string>",
"voiceSpeed": 123,
"interruptionThreshold": 123,
"startTime": "2023-11-07T05:31:56Z",
"isGHL": 123,
"appointmentAgent": 123,
"from_admin": 123,
"knowledgeBases": [
{
"id": 123,
"user_id": 123,
"knowledge_name": "<string>",
"question": "<string>",
"answer": "<string>"
}
],
"questionsData": ["<unknown>"],
"pronunciationGuide": [
{
"word": "<string>",
"pronunciation": "<string>",
"caseSensitive": True,
"spaced": True
}
],
"noise_cancellation": False,
"keywords": ["keyword1", "keyword2"],
"timezone": "America/Los_Angeles",
"request_data": {
"name": "John Doe",
"age": 30
},
"start_time": "2024-03-20 12:00:00 -05:00",
"voicemail_message": "Please leave a message after the beep",
"voicemail_action": "hangup",
"retry": {
"wait": 10,
"voicemail_action": "leave_message",
"voicemail_message": "Hello, this is a test message."
},
"record": True,
"webhook_events": ["queue", "call", "latency"],
"citation_schema_id": "dcad76eb-57b6-4be6-922f-8a5a95e2ffrt",
"analysis_preset": "a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7",
"answered_by_enabled": True,
"available_tags": ["got_full_name_and_number", "no_information_provided"],
"geospatial_dialing": "bd039087-decb-435a-a6e3-ca1ffbf89974",
"precall_dtmf_sequence": "1234567890*#w",
"pool_id": "#1234-5678-9012-3456",
"for_user_id": 123,
"agency_id": 123,
"calendarID": "<string>",
"firstSentence": "<string>",
"calendarName": "<string>",
"customTool": "<string>",
"fromAdmin": True,
"fromAgency": 123,
"background_track": "<string>",
"block_interruptions": 123,
"transferPhoneNumber": [
{
"transfer_number": "<string>",
"transfer_type": "<string>"
}
],
"voiceMail_action": "<string>",
"agentPhones": ["<string>"],
"pathwayID": "<string>",
"voicemailDetection": "<string>",
"memory_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"retry_wait": 10,
"retry_voicemail_action": "leave_message",
"retry_voicemail_message": "Hello, this is a test message."
}
headers = {
"x-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-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agentName: '<string>',
task: '<string>',
model: '<string>',
temperature: 123,
wait_for_greeting: '<string>',
max_duration: 123,
selectedVoice: '<string>',
voiceId: '<string>',
selectedLanguage: '<string>',
voiceSpeed: 123,
interruptionThreshold: 123,
startTime: '2023-11-07T05:31:56Z',
isGHL: 123,
appointmentAgent: 123,
from_admin: 123,
knowledgeBases: [
{
id: 123,
user_id: 123,
knowledge_name: '<string>',
question: '<string>',
answer: '<string>'
}
],
questionsData: ['<unknown>'],
pronunciationGuide: [
{word: '<string>', pronunciation: '<string>', caseSensitive: true, spaced: true}
],
noise_cancellation: false,
keywords: ['keyword1', 'keyword2'],
timezone: 'America/Los_Angeles',
request_data: {name: 'John Doe', age: 30},
start_time: '2024-03-20 12:00:00 -05:00',
voicemail_message: 'Please leave a message after the beep',
voicemail_action: 'hangup',
retry: {
wait: 10,
voicemail_action: 'leave_message',
voicemail_message: 'Hello, this is a test message.'
},
record: true,
webhook_events: ['queue', 'call', 'latency'],
citation_schema_id: 'dcad76eb-57b6-4be6-922f-8a5a95e2ffrt',
analysis_preset: 'a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7',
answered_by_enabled: true,
available_tags: ['got_full_name_and_number', 'no_information_provided'],
geospatial_dialing: 'bd039087-decb-435a-a6e3-ca1ffbf89974',
precall_dtmf_sequence: '1234567890*#w',
pool_id: '#1234-5678-9012-3456',
for_user_id: 123,
agency_id: 123,
calendarID: '<string>',
firstSentence: '<string>',
calendarName: '<string>',
customTool: '<string>',
fromAdmin: true,
fromAgency: 123,
background_track: '<string>',
block_interruptions: 123,
transferPhoneNumber: [{transfer_number: '<string>', transfer_type: '<string>'}],
voiceMail_action: '<string>',
agentPhones: ['<string>'],
pathwayID: '<string>',
voicemailDetection: '<string>',
memory_id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
retry_wait: 10,
retry_voicemail_action: 'leave_message',
retry_voicemail_message: 'Hello, this is a test message.'
})
};
fetch('https://api.cleartalk.ai/agency/agents', 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.cleartalk.ai/agency/agents",
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([
'agentName' => '<string>',
'task' => '<string>',
'model' => '<string>',
'temperature' => 123,
'wait_for_greeting' => '<string>',
'max_duration' => 123,
'selectedVoice' => '<string>',
'voiceId' => '<string>',
'selectedLanguage' => '<string>',
'voiceSpeed' => 123,
'interruptionThreshold' => 123,
'startTime' => '2023-11-07T05:31:56Z',
'isGHL' => 123,
'appointmentAgent' => 123,
'from_admin' => 123,
'knowledgeBases' => [
[
'id' => 123,
'user_id' => 123,
'knowledge_name' => '<string>',
'question' => '<string>',
'answer' => '<string>'
]
],
'questionsData' => [
'<unknown>'
],
'pronunciationGuide' => [
[
'word' => '<string>',
'pronunciation' => '<string>',
'caseSensitive' => true,
'spaced' => true
]
],
'noise_cancellation' => false,
'keywords' => [
'keyword1',
'keyword2'
],
'timezone' => 'America/Los_Angeles',
'request_data' => [
'name' => 'John Doe',
'age' => 30
],
'start_time' => '2024-03-20 12:00:00 -05:00',
'voicemail_message' => 'Please leave a message after the beep',
'voicemail_action' => 'hangup',
'retry' => [
'wait' => 10,
'voicemail_action' => 'leave_message',
'voicemail_message' => 'Hello, this is a test message.'
],
'record' => true,
'webhook_events' => [
'queue',
'call',
'latency'
],
'citation_schema_id' => 'dcad76eb-57b6-4be6-922f-8a5a95e2ffrt',
'analysis_preset' => 'a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7',
'answered_by_enabled' => true,
'available_tags' => [
'got_full_name_and_number',
'no_information_provided'
],
'geospatial_dialing' => 'bd039087-decb-435a-a6e3-ca1ffbf89974',
'precall_dtmf_sequence' => '1234567890*#w',
'pool_id' => '#1234-5678-9012-3456',
'for_user_id' => 123,
'agency_id' => 123,
'calendarID' => '<string>',
'firstSentence' => '<string>',
'calendarName' => '<string>',
'customTool' => '<string>',
'fromAdmin' => true,
'fromAgency' => 123,
'background_track' => '<string>',
'block_interruptions' => 123,
'transferPhoneNumber' => [
[
'transfer_number' => '<string>',
'transfer_type' => '<string>'
]
],
'voiceMail_action' => '<string>',
'agentPhones' => [
'<string>'
],
'pathwayID' => '<string>',
'voicemailDetection' => '<string>',
'memory_id' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'retry_wait' => 10,
'retry_voicemail_action' => 'leave_message',
'retry_voicemail_message' => 'Hello, this is a test message.'
]),
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://api.cleartalk.ai/agency/agents"
payload := strings.NewReader("{\n \"agentName\": \"<string>\",\n \"task\": \"<string>\",\n \"model\": \"<string>\",\n \"temperature\": 123,\n \"wait_for_greeting\": \"<string>\",\n \"max_duration\": 123,\n \"selectedVoice\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"selectedLanguage\": \"<string>\",\n \"voiceSpeed\": 123,\n \"interruptionThreshold\": 123,\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"isGHL\": 123,\n \"appointmentAgent\": 123,\n \"from_admin\": 123,\n \"knowledgeBases\": [\n {\n \"id\": 123,\n \"user_id\": 123,\n \"knowledge_name\": \"<string>\",\n \"question\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ],\n \"questionsData\": [\n \"<unknown>\"\n ],\n \"pronunciationGuide\": [\n {\n \"word\": \"<string>\",\n \"pronunciation\": \"<string>\",\n \"caseSensitive\": true,\n \"spaced\": true\n }\n ],\n \"noise_cancellation\": false,\n \"keywords\": [\n \"keyword1\",\n \"keyword2\"\n ],\n \"timezone\": \"America/Los_Angeles\",\n \"request_data\": {\n \"name\": \"John Doe\",\n \"age\": 30\n },\n \"start_time\": \"2024-03-20 12:00:00 -05:00\",\n \"voicemail_message\": \"Please leave a message after the beep\",\n \"voicemail_action\": \"hangup\",\n \"retry\": {\n \"wait\": 10,\n \"voicemail_action\": \"leave_message\",\n \"voicemail_message\": \"Hello, this is a test message.\"\n },\n \"record\": true,\n \"webhook_events\": [\n \"queue\",\n \"call\",\n \"latency\"\n ],\n \"citation_schema_id\": \"dcad76eb-57b6-4be6-922f-8a5a95e2ffrt\",\n \"analysis_preset\": \"a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7\",\n \"answered_by_enabled\": true,\n \"available_tags\": [\n \"got_full_name_and_number\",\n \"no_information_provided\"\n ],\n \"geospatial_dialing\": \"bd039087-decb-435a-a6e3-ca1ffbf89974\",\n \"precall_dtmf_sequence\": \"1234567890*#w\",\n \"pool_id\": \"#1234-5678-9012-3456\",\n \"for_user_id\": 123,\n \"agency_id\": 123,\n \"calendarID\": \"<string>\",\n \"firstSentence\": \"<string>\",\n \"calendarName\": \"<string>\",\n \"customTool\": \"<string>\",\n \"fromAdmin\": true,\n \"fromAgency\": 123,\n \"background_track\": \"<string>\",\n \"block_interruptions\": 123,\n \"transferPhoneNumber\": [\n {\n \"transfer_number\": \"<string>\",\n \"transfer_type\": \"<string>\"\n }\n ],\n \"voiceMail_action\": \"<string>\",\n \"agentPhones\": [\n \"<string>\"\n ],\n \"pathwayID\": \"<string>\",\n \"voicemailDetection\": \"<string>\",\n \"memory_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"retry_wait\": 10,\n \"retry_voicemail_action\": \"leave_message\",\n \"retry_voicemail_message\": \"Hello, this is a test message.\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.cleartalk.ai/agency/agents")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agentName\": \"<string>\",\n \"task\": \"<string>\",\n \"model\": \"<string>\",\n \"temperature\": 123,\n \"wait_for_greeting\": \"<string>\",\n \"max_duration\": 123,\n \"selectedVoice\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"selectedLanguage\": \"<string>\",\n \"voiceSpeed\": 123,\n \"interruptionThreshold\": 123,\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"isGHL\": 123,\n \"appointmentAgent\": 123,\n \"from_admin\": 123,\n \"knowledgeBases\": [\n {\n \"id\": 123,\n \"user_id\": 123,\n \"knowledge_name\": \"<string>\",\n \"question\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ],\n \"questionsData\": [\n \"<unknown>\"\n ],\n \"pronunciationGuide\": [\n {\n \"word\": \"<string>\",\n \"pronunciation\": \"<string>\",\n \"caseSensitive\": true,\n \"spaced\": true\n }\n ],\n \"noise_cancellation\": false,\n \"keywords\": [\n \"keyword1\",\n \"keyword2\"\n ],\n \"timezone\": \"America/Los_Angeles\",\n \"request_data\": {\n \"name\": \"John Doe\",\n \"age\": 30\n },\n \"start_time\": \"2024-03-20 12:00:00 -05:00\",\n \"voicemail_message\": \"Please leave a message after the beep\",\n \"voicemail_action\": \"hangup\",\n \"retry\": {\n \"wait\": 10,\n \"voicemail_action\": \"leave_message\",\n \"voicemail_message\": \"Hello, this is a test message.\"\n },\n \"record\": true,\n \"webhook_events\": [\n \"queue\",\n \"call\",\n \"latency\"\n ],\n \"citation_schema_id\": \"dcad76eb-57b6-4be6-922f-8a5a95e2ffrt\",\n \"analysis_preset\": \"a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7\",\n \"answered_by_enabled\": true,\n \"available_tags\": [\n \"got_full_name_and_number\",\n \"no_information_provided\"\n ],\n \"geospatial_dialing\": \"bd039087-decb-435a-a6e3-ca1ffbf89974\",\n \"precall_dtmf_sequence\": \"1234567890*#w\",\n \"pool_id\": \"#1234-5678-9012-3456\",\n \"for_user_id\": 123,\n \"agency_id\": 123,\n \"calendarID\": \"<string>\",\n \"firstSentence\": \"<string>\",\n \"calendarName\": \"<string>\",\n \"customTool\": \"<string>\",\n \"fromAdmin\": true,\n \"fromAgency\": 123,\n \"background_track\": \"<string>\",\n \"block_interruptions\": 123,\n \"transferPhoneNumber\": [\n {\n \"transfer_number\": \"<string>\",\n \"transfer_type\": \"<string>\"\n }\n ],\n \"voiceMail_action\": \"<string>\",\n \"agentPhones\": [\n \"<string>\"\n ],\n \"pathwayID\": \"<string>\",\n \"voicemailDetection\": \"<string>\",\n \"memory_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"retry_wait\": 10,\n \"retry_voicemail_action\": \"leave_message\",\n \"retry_voicemail_message\": \"Hello, this is a test message.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cleartalk.ai/agency/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentName\": \"<string>\",\n \"task\": \"<string>\",\n \"model\": \"<string>\",\n \"temperature\": 123,\n \"wait_for_greeting\": \"<string>\",\n \"max_duration\": 123,\n \"selectedVoice\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"selectedLanguage\": \"<string>\",\n \"voiceSpeed\": 123,\n \"interruptionThreshold\": 123,\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"isGHL\": 123,\n \"appointmentAgent\": 123,\n \"from_admin\": 123,\n \"knowledgeBases\": [\n {\n \"id\": 123,\n \"user_id\": 123,\n \"knowledge_name\": \"<string>\",\n \"question\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ],\n \"questionsData\": [\n \"<unknown>\"\n ],\n \"pronunciationGuide\": [\n {\n \"word\": \"<string>\",\n \"pronunciation\": \"<string>\",\n \"caseSensitive\": true,\n \"spaced\": true\n }\n ],\n \"noise_cancellation\": false,\n \"keywords\": [\n \"keyword1\",\n \"keyword2\"\n ],\n \"timezone\": \"America/Los_Angeles\",\n \"request_data\": {\n \"name\": \"John Doe\",\n \"age\": 30\n },\n \"start_time\": \"2024-03-20 12:00:00 -05:00\",\n \"voicemail_message\": \"Please leave a message after the beep\",\n \"voicemail_action\": \"hangup\",\n \"retry\": {\n \"wait\": 10,\n \"voicemail_action\": \"leave_message\",\n \"voicemail_message\": \"Hello, this is a test message.\"\n },\n \"record\": true,\n \"webhook_events\": [\n \"queue\",\n \"call\",\n \"latency\"\n ],\n \"citation_schema_id\": \"dcad76eb-57b6-4be6-922f-8a5a95e2ffrt\",\n \"analysis_preset\": \"a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7\",\n \"answered_by_enabled\": true,\n \"available_tags\": [\n \"got_full_name_and_number\",\n \"no_information_provided\"\n ],\n \"geospatial_dialing\": \"bd039087-decb-435a-a6e3-ca1ffbf89974\",\n \"precall_dtmf_sequence\": \"1234567890*#w\",\n \"pool_id\": \"#1234-5678-9012-3456\",\n \"for_user_id\": 123,\n \"agency_id\": 123,\n \"calendarID\": \"<string>\",\n \"firstSentence\": \"<string>\",\n \"calendarName\": \"<string>\",\n \"customTool\": \"<string>\",\n \"fromAdmin\": true,\n \"fromAgency\": 123,\n \"background_track\": \"<string>\",\n \"block_interruptions\": 123,\n \"transferPhoneNumber\": [\n {\n \"transfer_number\": \"<string>\",\n \"transfer_type\": \"<string>\"\n }\n ],\n \"voiceMail_action\": \"<string>\",\n \"agentPhones\": [\n \"<string>\"\n ],\n \"pathwayID\": \"<string>\",\n \"voicemailDetection\": \"<string>\",\n \"memory_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"retry_wait\": 10,\n \"retry_voicemail_action\": \"leave_message\",\n \"retry_voicemail_message\": \"Hello, this is a test message.\"\n}"
response = http.request(request)
puts response.read_bodyCreate a new agent
curl --request POST \
--url https://api.cleartalk.ai/agency/agents \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"agentName": "<string>",
"task": "<string>",
"model": "<string>",
"temperature": 123,
"wait_for_greeting": "<string>",
"max_duration": 123,
"selectedVoice": "<string>",
"voiceId": "<string>",
"selectedLanguage": "<string>",
"voiceSpeed": 123,
"interruptionThreshold": 123,
"startTime": "2023-11-07T05:31:56Z",
"isGHL": 123,
"appointmentAgent": 123,
"from_admin": 123,
"knowledgeBases": [
{
"id": 123,
"user_id": 123,
"knowledge_name": "<string>",
"question": "<string>",
"answer": "<string>"
}
],
"questionsData": [
"<unknown>"
],
"pronunciationGuide": [
{
"word": "<string>",
"pronunciation": "<string>",
"caseSensitive": true,
"spaced": true
}
],
"noise_cancellation": false,
"keywords": [
"keyword1",
"keyword2"
],
"timezone": "America/Los_Angeles",
"request_data": {
"name": "John Doe",
"age": 30
},
"start_time": "2024-03-20 12:00:00 -05:00",
"voicemail_message": "Please leave a message after the beep",
"voicemail_action": "hangup",
"retry": {
"wait": 10,
"voicemail_action": "leave_message",
"voicemail_message": "Hello, this is a test message."
},
"record": true,
"webhook_events": [
"queue",
"call",
"latency"
],
"citation_schema_id": "dcad76eb-57b6-4be6-922f-8a5a95e2ffrt",
"analysis_preset": "a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7",
"answered_by_enabled": true,
"available_tags": [
"got_full_name_and_number",
"no_information_provided"
],
"geospatial_dialing": "bd039087-decb-435a-a6e3-ca1ffbf89974",
"precall_dtmf_sequence": "1234567890*#w",
"pool_id": "#1234-5678-9012-3456",
"for_user_id": 123,
"agency_id": 123,
"calendarID": "<string>",
"firstSentence": "<string>",
"calendarName": "<string>",
"customTool": "<string>",
"fromAdmin": true,
"fromAgency": 123,
"background_track": "<string>",
"block_interruptions": 123,
"transferPhoneNumber": [
{
"transfer_number": "<string>",
"transfer_type": "<string>"
}
],
"voiceMail_action": "<string>",
"agentPhones": [
"<string>"
],
"pathwayID": "<string>",
"voicemailDetection": "<string>",
"memory_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"retry_wait": 10,
"retry_voicemail_action": "leave_message",
"retry_voicemail_message": "Hello, this is a test message."
}
'import requests
url = "https://api.cleartalk.ai/agency/agents"
payload = {
"agentName": "<string>",
"task": "<string>",
"model": "<string>",
"temperature": 123,
"wait_for_greeting": "<string>",
"max_duration": 123,
"selectedVoice": "<string>",
"voiceId": "<string>",
"selectedLanguage": "<string>",
"voiceSpeed": 123,
"interruptionThreshold": 123,
"startTime": "2023-11-07T05:31:56Z",
"isGHL": 123,
"appointmentAgent": 123,
"from_admin": 123,
"knowledgeBases": [
{
"id": 123,
"user_id": 123,
"knowledge_name": "<string>",
"question": "<string>",
"answer": "<string>"
}
],
"questionsData": ["<unknown>"],
"pronunciationGuide": [
{
"word": "<string>",
"pronunciation": "<string>",
"caseSensitive": True,
"spaced": True
}
],
"noise_cancellation": False,
"keywords": ["keyword1", "keyword2"],
"timezone": "America/Los_Angeles",
"request_data": {
"name": "John Doe",
"age": 30
},
"start_time": "2024-03-20 12:00:00 -05:00",
"voicemail_message": "Please leave a message after the beep",
"voicemail_action": "hangup",
"retry": {
"wait": 10,
"voicemail_action": "leave_message",
"voicemail_message": "Hello, this is a test message."
},
"record": True,
"webhook_events": ["queue", "call", "latency"],
"citation_schema_id": "dcad76eb-57b6-4be6-922f-8a5a95e2ffrt",
"analysis_preset": "a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7",
"answered_by_enabled": True,
"available_tags": ["got_full_name_and_number", "no_information_provided"],
"geospatial_dialing": "bd039087-decb-435a-a6e3-ca1ffbf89974",
"precall_dtmf_sequence": "1234567890*#w",
"pool_id": "#1234-5678-9012-3456",
"for_user_id": 123,
"agency_id": 123,
"calendarID": "<string>",
"firstSentence": "<string>",
"calendarName": "<string>",
"customTool": "<string>",
"fromAdmin": True,
"fromAgency": 123,
"background_track": "<string>",
"block_interruptions": 123,
"transferPhoneNumber": [
{
"transfer_number": "<string>",
"transfer_type": "<string>"
}
],
"voiceMail_action": "<string>",
"agentPhones": ["<string>"],
"pathwayID": "<string>",
"voicemailDetection": "<string>",
"memory_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"retry_wait": 10,
"retry_voicemail_action": "leave_message",
"retry_voicemail_message": "Hello, this is a test message."
}
headers = {
"x-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-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agentName: '<string>',
task: '<string>',
model: '<string>',
temperature: 123,
wait_for_greeting: '<string>',
max_duration: 123,
selectedVoice: '<string>',
voiceId: '<string>',
selectedLanguage: '<string>',
voiceSpeed: 123,
interruptionThreshold: 123,
startTime: '2023-11-07T05:31:56Z',
isGHL: 123,
appointmentAgent: 123,
from_admin: 123,
knowledgeBases: [
{
id: 123,
user_id: 123,
knowledge_name: '<string>',
question: '<string>',
answer: '<string>'
}
],
questionsData: ['<unknown>'],
pronunciationGuide: [
{word: '<string>', pronunciation: '<string>', caseSensitive: true, spaced: true}
],
noise_cancellation: false,
keywords: ['keyword1', 'keyword2'],
timezone: 'America/Los_Angeles',
request_data: {name: 'John Doe', age: 30},
start_time: '2024-03-20 12:00:00 -05:00',
voicemail_message: 'Please leave a message after the beep',
voicemail_action: 'hangup',
retry: {
wait: 10,
voicemail_action: 'leave_message',
voicemail_message: 'Hello, this is a test message.'
},
record: true,
webhook_events: ['queue', 'call', 'latency'],
citation_schema_id: 'dcad76eb-57b6-4be6-922f-8a5a95e2ffrt',
analysis_preset: 'a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7',
answered_by_enabled: true,
available_tags: ['got_full_name_and_number', 'no_information_provided'],
geospatial_dialing: 'bd039087-decb-435a-a6e3-ca1ffbf89974',
precall_dtmf_sequence: '1234567890*#w',
pool_id: '#1234-5678-9012-3456',
for_user_id: 123,
agency_id: 123,
calendarID: '<string>',
firstSentence: '<string>',
calendarName: '<string>',
customTool: '<string>',
fromAdmin: true,
fromAgency: 123,
background_track: '<string>',
block_interruptions: 123,
transferPhoneNumber: [{transfer_number: '<string>', transfer_type: '<string>'}],
voiceMail_action: '<string>',
agentPhones: ['<string>'],
pathwayID: '<string>',
voicemailDetection: '<string>',
memory_id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
retry_wait: 10,
retry_voicemail_action: 'leave_message',
retry_voicemail_message: 'Hello, this is a test message.'
})
};
fetch('https://api.cleartalk.ai/agency/agents', 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.cleartalk.ai/agency/agents",
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([
'agentName' => '<string>',
'task' => '<string>',
'model' => '<string>',
'temperature' => 123,
'wait_for_greeting' => '<string>',
'max_duration' => 123,
'selectedVoice' => '<string>',
'voiceId' => '<string>',
'selectedLanguage' => '<string>',
'voiceSpeed' => 123,
'interruptionThreshold' => 123,
'startTime' => '2023-11-07T05:31:56Z',
'isGHL' => 123,
'appointmentAgent' => 123,
'from_admin' => 123,
'knowledgeBases' => [
[
'id' => 123,
'user_id' => 123,
'knowledge_name' => '<string>',
'question' => '<string>',
'answer' => '<string>'
]
],
'questionsData' => [
'<unknown>'
],
'pronunciationGuide' => [
[
'word' => '<string>',
'pronunciation' => '<string>',
'caseSensitive' => true,
'spaced' => true
]
],
'noise_cancellation' => false,
'keywords' => [
'keyword1',
'keyword2'
],
'timezone' => 'America/Los_Angeles',
'request_data' => [
'name' => 'John Doe',
'age' => 30
],
'start_time' => '2024-03-20 12:00:00 -05:00',
'voicemail_message' => 'Please leave a message after the beep',
'voicemail_action' => 'hangup',
'retry' => [
'wait' => 10,
'voicemail_action' => 'leave_message',
'voicemail_message' => 'Hello, this is a test message.'
],
'record' => true,
'webhook_events' => [
'queue',
'call',
'latency'
],
'citation_schema_id' => 'dcad76eb-57b6-4be6-922f-8a5a95e2ffrt',
'analysis_preset' => 'a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7',
'answered_by_enabled' => true,
'available_tags' => [
'got_full_name_and_number',
'no_information_provided'
],
'geospatial_dialing' => 'bd039087-decb-435a-a6e3-ca1ffbf89974',
'precall_dtmf_sequence' => '1234567890*#w',
'pool_id' => '#1234-5678-9012-3456',
'for_user_id' => 123,
'agency_id' => 123,
'calendarID' => '<string>',
'firstSentence' => '<string>',
'calendarName' => '<string>',
'customTool' => '<string>',
'fromAdmin' => true,
'fromAgency' => 123,
'background_track' => '<string>',
'block_interruptions' => 123,
'transferPhoneNumber' => [
[
'transfer_number' => '<string>',
'transfer_type' => '<string>'
]
],
'voiceMail_action' => '<string>',
'agentPhones' => [
'<string>'
],
'pathwayID' => '<string>',
'voicemailDetection' => '<string>',
'memory_id' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'retry_wait' => 10,
'retry_voicemail_action' => 'leave_message',
'retry_voicemail_message' => 'Hello, this is a test message.'
]),
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://api.cleartalk.ai/agency/agents"
payload := strings.NewReader("{\n \"agentName\": \"<string>\",\n \"task\": \"<string>\",\n \"model\": \"<string>\",\n \"temperature\": 123,\n \"wait_for_greeting\": \"<string>\",\n \"max_duration\": 123,\n \"selectedVoice\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"selectedLanguage\": \"<string>\",\n \"voiceSpeed\": 123,\n \"interruptionThreshold\": 123,\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"isGHL\": 123,\n \"appointmentAgent\": 123,\n \"from_admin\": 123,\n \"knowledgeBases\": [\n {\n \"id\": 123,\n \"user_id\": 123,\n \"knowledge_name\": \"<string>\",\n \"question\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ],\n \"questionsData\": [\n \"<unknown>\"\n ],\n \"pronunciationGuide\": [\n {\n \"word\": \"<string>\",\n \"pronunciation\": \"<string>\",\n \"caseSensitive\": true,\n \"spaced\": true\n }\n ],\n \"noise_cancellation\": false,\n \"keywords\": [\n \"keyword1\",\n \"keyword2\"\n ],\n \"timezone\": \"America/Los_Angeles\",\n \"request_data\": {\n \"name\": \"John Doe\",\n \"age\": 30\n },\n \"start_time\": \"2024-03-20 12:00:00 -05:00\",\n \"voicemail_message\": \"Please leave a message after the beep\",\n \"voicemail_action\": \"hangup\",\n \"retry\": {\n \"wait\": 10,\n \"voicemail_action\": \"leave_message\",\n \"voicemail_message\": \"Hello, this is a test message.\"\n },\n \"record\": true,\n \"webhook_events\": [\n \"queue\",\n \"call\",\n \"latency\"\n ],\n \"citation_schema_id\": \"dcad76eb-57b6-4be6-922f-8a5a95e2ffrt\",\n \"analysis_preset\": \"a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7\",\n \"answered_by_enabled\": true,\n \"available_tags\": [\n \"got_full_name_and_number\",\n \"no_information_provided\"\n ],\n \"geospatial_dialing\": \"bd039087-decb-435a-a6e3-ca1ffbf89974\",\n \"precall_dtmf_sequence\": \"1234567890*#w\",\n \"pool_id\": \"#1234-5678-9012-3456\",\n \"for_user_id\": 123,\n \"agency_id\": 123,\n \"calendarID\": \"<string>\",\n \"firstSentence\": \"<string>\",\n \"calendarName\": \"<string>\",\n \"customTool\": \"<string>\",\n \"fromAdmin\": true,\n \"fromAgency\": 123,\n \"background_track\": \"<string>\",\n \"block_interruptions\": 123,\n \"transferPhoneNumber\": [\n {\n \"transfer_number\": \"<string>\",\n \"transfer_type\": \"<string>\"\n }\n ],\n \"voiceMail_action\": \"<string>\",\n \"agentPhones\": [\n \"<string>\"\n ],\n \"pathwayID\": \"<string>\",\n \"voicemailDetection\": \"<string>\",\n \"memory_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"retry_wait\": 10,\n \"retry_voicemail_action\": \"leave_message\",\n \"retry_voicemail_message\": \"Hello, this is a test message.\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.cleartalk.ai/agency/agents")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agentName\": \"<string>\",\n \"task\": \"<string>\",\n \"model\": \"<string>\",\n \"temperature\": 123,\n \"wait_for_greeting\": \"<string>\",\n \"max_duration\": 123,\n \"selectedVoice\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"selectedLanguage\": \"<string>\",\n \"voiceSpeed\": 123,\n \"interruptionThreshold\": 123,\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"isGHL\": 123,\n \"appointmentAgent\": 123,\n \"from_admin\": 123,\n \"knowledgeBases\": [\n {\n \"id\": 123,\n \"user_id\": 123,\n \"knowledge_name\": \"<string>\",\n \"question\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ],\n \"questionsData\": [\n \"<unknown>\"\n ],\n \"pronunciationGuide\": [\n {\n \"word\": \"<string>\",\n \"pronunciation\": \"<string>\",\n \"caseSensitive\": true,\n \"spaced\": true\n }\n ],\n \"noise_cancellation\": false,\n \"keywords\": [\n \"keyword1\",\n \"keyword2\"\n ],\n \"timezone\": \"America/Los_Angeles\",\n \"request_data\": {\n \"name\": \"John Doe\",\n \"age\": 30\n },\n \"start_time\": \"2024-03-20 12:00:00 -05:00\",\n \"voicemail_message\": \"Please leave a message after the beep\",\n \"voicemail_action\": \"hangup\",\n \"retry\": {\n \"wait\": 10,\n \"voicemail_action\": \"leave_message\",\n \"voicemail_message\": \"Hello, this is a test message.\"\n },\n \"record\": true,\n \"webhook_events\": [\n \"queue\",\n \"call\",\n \"latency\"\n ],\n \"citation_schema_id\": \"dcad76eb-57b6-4be6-922f-8a5a95e2ffrt\",\n \"analysis_preset\": \"a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7\",\n \"answered_by_enabled\": true,\n \"available_tags\": [\n \"got_full_name_and_number\",\n \"no_information_provided\"\n ],\n \"geospatial_dialing\": \"bd039087-decb-435a-a6e3-ca1ffbf89974\",\n \"precall_dtmf_sequence\": \"1234567890*#w\",\n \"pool_id\": \"#1234-5678-9012-3456\",\n \"for_user_id\": 123,\n \"agency_id\": 123,\n \"calendarID\": \"<string>\",\n \"firstSentence\": \"<string>\",\n \"calendarName\": \"<string>\",\n \"customTool\": \"<string>\",\n \"fromAdmin\": true,\n \"fromAgency\": 123,\n \"background_track\": \"<string>\",\n \"block_interruptions\": 123,\n \"transferPhoneNumber\": [\n {\n \"transfer_number\": \"<string>\",\n \"transfer_type\": \"<string>\"\n }\n ],\n \"voiceMail_action\": \"<string>\",\n \"agentPhones\": [\n \"<string>\"\n ],\n \"pathwayID\": \"<string>\",\n \"voicemailDetection\": \"<string>\",\n \"memory_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"retry_wait\": 10,\n \"retry_voicemail_action\": \"leave_message\",\n \"retry_voicemail_message\": \"Hello, this is a test message.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cleartalk.ai/agency/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentName\": \"<string>\",\n \"task\": \"<string>\",\n \"model\": \"<string>\",\n \"temperature\": 123,\n \"wait_for_greeting\": \"<string>\",\n \"max_duration\": 123,\n \"selectedVoice\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"selectedLanguage\": \"<string>\",\n \"voiceSpeed\": 123,\n \"interruptionThreshold\": 123,\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"isGHL\": 123,\n \"appointmentAgent\": 123,\n \"from_admin\": 123,\n \"knowledgeBases\": [\n {\n \"id\": 123,\n \"user_id\": 123,\n \"knowledge_name\": \"<string>\",\n \"question\": \"<string>\",\n \"answer\": \"<string>\"\n }\n ],\n \"questionsData\": [\n \"<unknown>\"\n ],\n \"pronunciationGuide\": [\n {\n \"word\": \"<string>\",\n \"pronunciation\": \"<string>\",\n \"caseSensitive\": true,\n \"spaced\": true\n }\n ],\n \"noise_cancellation\": false,\n \"keywords\": [\n \"keyword1\",\n \"keyword2\"\n ],\n \"timezone\": \"America/Los_Angeles\",\n \"request_data\": {\n \"name\": \"John Doe\",\n \"age\": 30\n },\n \"start_time\": \"2024-03-20 12:00:00 -05:00\",\n \"voicemail_message\": \"Please leave a message after the beep\",\n \"voicemail_action\": \"hangup\",\n \"retry\": {\n \"wait\": 10,\n \"voicemail_action\": \"leave_message\",\n \"voicemail_message\": \"Hello, this is a test message.\"\n },\n \"record\": true,\n \"webhook_events\": [\n \"queue\",\n \"call\",\n \"latency\"\n ],\n \"citation_schema_id\": \"dcad76eb-57b6-4be6-922f-8a5a95e2ffrt\",\n \"analysis_preset\": \"a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7\",\n \"answered_by_enabled\": true,\n \"available_tags\": [\n \"got_full_name_and_number\",\n \"no_information_provided\"\n ],\n \"geospatial_dialing\": \"bd039087-decb-435a-a6e3-ca1ffbf89974\",\n \"precall_dtmf_sequence\": \"1234567890*#w\",\n \"pool_id\": \"#1234-5678-9012-3456\",\n \"for_user_id\": 123,\n \"agency_id\": 123,\n \"calendarID\": \"<string>\",\n \"firstSentence\": \"<string>\",\n \"calendarName\": \"<string>\",\n \"customTool\": \"<string>\",\n \"fromAdmin\": true,\n \"fromAgency\": 123,\n \"background_track\": \"<string>\",\n \"block_interruptions\": 123,\n \"transferPhoneNumber\": [\n {\n \"transfer_number\": \"<string>\",\n \"transfer_type\": \"<string>\"\n }\n ],\n \"voiceMail_action\": \"<string>\",\n \"agentPhones\": [\n \"<string>\"\n ],\n \"pathwayID\": \"<string>\",\n \"voicemailDetection\": \"<string>\",\n \"memory_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"retry_wait\": 10,\n \"retry_voicemail_action\": \"leave_message\",\n \"retry_voicemail_message\": \"Hello, this is a test message.\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
API Key for authentication
Body
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Whether to enable noise cancellation
false
Keywords to boost in transcription
["keyword1", "keyword2"]
Timezone for the call
"America/Los_Angeles"
Request data available to the AI agent during the call
{ "name": "John Doe", "age": 30 }
Scheduled start time for the call
"2024-03-20 12:00:00 -05:00"
Message to leave on voicemail
"Please leave a message after the beep"
Action to take when voicemail is detected
hangup, leave_message, ignore "hangup"
Retry configuration for voicemail calls
Show child attributes
Show child attributes
{
"wait": 10,
"voicemail_action": "leave_message",
"voicemail_message": "Hello, this is a test message."
}
Whether to record the call
true
Events to stream to webhook
["queue", "call", "latency"]
Citation schema ID for post-call analysis
"dcad76eb-57b6-4be6-922f-8a5a95e2ffrt"
Analysis preset UUID
"a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7"
Whether to enable answered-by detection
true
Available disposition tags
[
"got_full_name_and_number",
"no_information_provided"
]
Geospatial dialing pool UUID
"bd039087-decb-435a-a6e3-ca1ffbf89974"
DTMF sequence to play before call starts
"1234567890*#w"
Pool ID
"#1234-5678-9012-3456"
Show child attributes
Show child attributes
UUID of the memory to associate with this agent
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Webhook configuration
Show child attributes
Show child attributes
Get data configuration
Show child attributes
Show child attributes
SMS configuration
Show child attributes
Show child attributes
Retry wait time in seconds (alternative to retry object)
10
Retry voicemail action (alternative to retry object)
"leave_message"
Retry voicemail message (alternative to retry object)
"Hello, this is a test message."
Response
Agent created successfully
