cURL
curl --request POST \
--url https://my.cald.ai/client/api/v1/agents \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"instructions": "<string>",
"maxCallDuration": 10,
"recordingSettings": {
"enable": false
},
"greeting": "<string>",
"transferSettings": {
"enable": false,
"rule": "always",
"phoneNumber": "<string>"
},
"machineSettings": {
"enable": false
},
"voicemailSettings": {
"enable": false,
"voicemail": "<string>"
},
"webhookSettings": {
"enable": false,
"url": "<string>"
},
"smsSettings": {
"enable": false,
"rule": "always",
"message": "<string>"
},
"voice": "standard_male"
}
'import requests
url = "https://my.cald.ai/client/api/v1/agents"
payload = {
"name": "<string>",
"instructions": "<string>",
"maxCallDuration": 10,
"recordingSettings": { "enable": False },
"greeting": "<string>",
"transferSettings": {
"enable": False,
"rule": "always",
"phoneNumber": "<string>"
},
"machineSettings": { "enable": False },
"voicemailSettings": {
"enable": False,
"voicemail": "<string>"
},
"webhookSettings": {
"enable": False,
"url": "<string>"
},
"smsSettings": {
"enable": False,
"rule": "always",
"message": "<string>"
},
"voice": "standard_male"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
instructions: '<string>',
maxCallDuration: 10,
recordingSettings: {enable: false},
greeting: '<string>',
transferSettings: {enable: false, rule: 'always', phoneNumber: '<string>'},
machineSettings: {enable: false},
voicemailSettings: {enable: false, voicemail: '<string>'},
webhookSettings: {enable: false, url: '<string>'},
smsSettings: {enable: false, rule: 'always', message: '<string>'},
voice: 'standard_male'
})
};
fetch('https://my.cald.ai/client/api/v1/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://my.cald.ai/client/api/v1/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([
'name' => '<string>',
'instructions' => '<string>',
'maxCallDuration' => 10,
'recordingSettings' => [
'enable' => false
],
'greeting' => '<string>',
'transferSettings' => [
'enable' => false,
'rule' => 'always',
'phoneNumber' => '<string>'
],
'machineSettings' => [
'enable' => false
],
'voicemailSettings' => [
'enable' => false,
'voicemail' => '<string>'
],
'webhookSettings' => [
'enable' => false,
'url' => '<string>'
],
'smsSettings' => [
'enable' => false,
'rule' => 'always',
'message' => '<string>'
],
'voice' => 'standard_male'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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://my.cald.ai/client/api/v1/agents"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"maxCallDuration\": 10,\n \"recordingSettings\": {\n \"enable\": false\n },\n \"greeting\": \"<string>\",\n \"transferSettings\": {\n \"enable\": false,\n \"rule\": \"always\",\n \"phoneNumber\": \"<string>\"\n },\n \"machineSettings\": {\n \"enable\": false\n },\n \"voicemailSettings\": {\n \"enable\": false,\n \"voicemail\": \"<string>\"\n },\n \"webhookSettings\": {\n \"enable\": false,\n \"url\": \"<string>\"\n },\n \"smsSettings\": {\n \"enable\": false,\n \"rule\": \"always\",\n \"message\": \"<string>\"\n },\n \"voice\": \"standard_male\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://my.cald.ai/client/api/v1/agents")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"maxCallDuration\": 10,\n \"recordingSettings\": {\n \"enable\": false\n },\n \"greeting\": \"<string>\",\n \"transferSettings\": {\n \"enable\": false,\n \"rule\": \"always\",\n \"phoneNumber\": \"<string>\"\n },\n \"machineSettings\": {\n \"enable\": false\n },\n \"voicemailSettings\": {\n \"enable\": false,\n \"voicemail\": \"<string>\"\n },\n \"webhookSettings\": {\n \"enable\": false,\n \"url\": \"<string>\"\n },\n \"smsSettings\": {\n \"enable\": false,\n \"rule\": \"always\",\n \"message\": \"<string>\"\n },\n \"voice\": \"standard_male\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://my.cald.ai/client/api/v1/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"maxCallDuration\": 10,\n \"recordingSettings\": {\n \"enable\": false\n },\n \"greeting\": \"<string>\",\n \"transferSettings\": {\n \"enable\": false,\n \"rule\": \"always\",\n \"phoneNumber\": \"<string>\"\n },\n \"machineSettings\": {\n \"enable\": false\n },\n \"voicemailSettings\": {\n \"enable\": false,\n \"voicemail\": \"<string>\"\n },\n \"webhookSettings\": {\n \"enable\": false,\n \"url\": \"<string>\"\n },\n \"smsSettings\": {\n \"enable\": false,\n \"rule\": \"always\",\n \"message\": \"<string>\"\n },\n \"voice\": \"standard_male\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"agentId": "<string>"
}Agents
Create an Agent
Create a new agent
POST
/
agents
cURL
curl --request POST \
--url https://my.cald.ai/client/api/v1/agents \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"instructions": "<string>",
"maxCallDuration": 10,
"recordingSettings": {
"enable": false
},
"greeting": "<string>",
"transferSettings": {
"enable": false,
"rule": "always",
"phoneNumber": "<string>"
},
"machineSettings": {
"enable": false
},
"voicemailSettings": {
"enable": false,
"voicemail": "<string>"
},
"webhookSettings": {
"enable": false,
"url": "<string>"
},
"smsSettings": {
"enable": false,
"rule": "always",
"message": "<string>"
},
"voice": "standard_male"
}
'import requests
url = "https://my.cald.ai/client/api/v1/agents"
payload = {
"name": "<string>",
"instructions": "<string>",
"maxCallDuration": 10,
"recordingSettings": { "enable": False },
"greeting": "<string>",
"transferSettings": {
"enable": False,
"rule": "always",
"phoneNumber": "<string>"
},
"machineSettings": { "enable": False },
"voicemailSettings": {
"enable": False,
"voicemail": "<string>"
},
"webhookSettings": {
"enable": False,
"url": "<string>"
},
"smsSettings": {
"enable": False,
"rule": "always",
"message": "<string>"
},
"voice": "standard_male"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
instructions: '<string>',
maxCallDuration: 10,
recordingSettings: {enable: false},
greeting: '<string>',
transferSettings: {enable: false, rule: 'always', phoneNumber: '<string>'},
machineSettings: {enable: false},
voicemailSettings: {enable: false, voicemail: '<string>'},
webhookSettings: {enable: false, url: '<string>'},
smsSettings: {enable: false, rule: 'always', message: '<string>'},
voice: 'standard_male'
})
};
fetch('https://my.cald.ai/client/api/v1/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://my.cald.ai/client/api/v1/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([
'name' => '<string>',
'instructions' => '<string>',
'maxCallDuration' => 10,
'recordingSettings' => [
'enable' => false
],
'greeting' => '<string>',
'transferSettings' => [
'enable' => false,
'rule' => 'always',
'phoneNumber' => '<string>'
],
'machineSettings' => [
'enable' => false
],
'voicemailSettings' => [
'enable' => false,
'voicemail' => '<string>'
],
'webhookSettings' => [
'enable' => false,
'url' => '<string>'
],
'smsSettings' => [
'enable' => false,
'rule' => 'always',
'message' => '<string>'
],
'voice' => 'standard_male'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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://my.cald.ai/client/api/v1/agents"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"maxCallDuration\": 10,\n \"recordingSettings\": {\n \"enable\": false\n },\n \"greeting\": \"<string>\",\n \"transferSettings\": {\n \"enable\": false,\n \"rule\": \"always\",\n \"phoneNumber\": \"<string>\"\n },\n \"machineSettings\": {\n \"enable\": false\n },\n \"voicemailSettings\": {\n \"enable\": false,\n \"voicemail\": \"<string>\"\n },\n \"webhookSettings\": {\n \"enable\": false,\n \"url\": \"<string>\"\n },\n \"smsSettings\": {\n \"enable\": false,\n \"rule\": \"always\",\n \"message\": \"<string>\"\n },\n \"voice\": \"standard_male\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://my.cald.ai/client/api/v1/agents")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"maxCallDuration\": 10,\n \"recordingSettings\": {\n \"enable\": false\n },\n \"greeting\": \"<string>\",\n \"transferSettings\": {\n \"enable\": false,\n \"rule\": \"always\",\n \"phoneNumber\": \"<string>\"\n },\n \"machineSettings\": {\n \"enable\": false\n },\n \"voicemailSettings\": {\n \"enable\": false,\n \"voicemail\": \"<string>\"\n },\n \"webhookSettings\": {\n \"enable\": false,\n \"url\": \"<string>\"\n },\n \"smsSettings\": {\n \"enable\": false,\n \"rule\": \"always\",\n \"message\": \"<string>\"\n },\n \"voice\": \"standard_male\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://my.cald.ai/client/api/v1/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"instructions\": \"<string>\",\n \"maxCallDuration\": 10,\n \"recordingSettings\": {\n \"enable\": false\n },\n \"greeting\": \"<string>\",\n \"transferSettings\": {\n \"enable\": false,\n \"rule\": \"always\",\n \"phoneNumber\": \"<string>\"\n },\n \"machineSettings\": {\n \"enable\": false\n },\n \"voicemailSettings\": {\n \"enable\": false,\n \"voicemail\": \"<string>\"\n },\n \"webhookSettings\": {\n \"enable\": false,\n \"url\": \"<string>\"\n },\n \"smsSettings\": {\n \"enable\": false,\n \"rule\": \"always\",\n \"message\": \"<string>\"\n },\n \"voice\": \"standard_male\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"agentId": "<string>"
}Authorizations
Your API key, e.g. caldLiveDe39a3accb206dd615f30d118e519df0
Body
application/json
The name given to the agent in the MyCald Dashboard
The instructions for the agent, for example, Hi, convince the prospect to buy the product
The maximum duration of a call in minutes, between 1 and 60
Show child attributes
Show child attributes
The greeting for the agent, for example, Hi there!
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The voice ID of the voice to use for the agent, for example, standard_male
⌘I