curl --request POST \
--url https://api.telleo.ai/v1/agents \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Riya – admissions",
"opening_line": "Hi {{name}}, this is Riya from Shiksha Academy. Is this a good time?",
"system_prompt": "You are Riya, an admissions counsellor…"
}
'import requests
url = "https://api.telleo.ai/v1/agents"
payload = {
"name": "Riya – admissions",
"opening_line": "Hi {{name}}, this is Riya from Shiksha Academy. Is this a good time?",
"system_prompt": "You are Riya, an admissions counsellor…"
}
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({
name: 'Riya – admissions',
opening_line: 'Hi {{name}}, this is Riya from Shiksha Academy. Is this a good time?',
system_prompt: 'You are Riya, an admissions counsellor…'
})
};
fetch('https://api.telleo.ai/v1/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"object": "agent",
"name": "<string>",
"enabled": true,
"direction": "outbound",
"language": "hinglish",
"tts_model": "<string>",
"voice": "<string>",
"opening_line": "<string>",
"system_prompt": "<string>",
"extraction_questions": [
"<string>"
],
"dispositions": [
"<string>"
],
"handoff_numbers": [
"<string>"
],
"max_call_minutes": 15,
"pace": 1.25,
"temperature": 1.005,
"voice_modulation": 1.75,
"booking_page_id": "<string>",
"send_rules": [
{}
],
"is_default": true,
"speech_cache_mode": "off",
"configuration": "full",
"uses_contact_name": true,
"variables": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"waiting_calls_canceled": 123,
"warnings": [
{
"field": "variables.date",
"code": "reserved_variable",
"message": "{{date}} in the agent's script is always filled with the current date and time; this value does not replace it. The agent receives it only as information about the contact."
}
],
"idempotent_replay": true
}Create an agent
Creates an AI agent. Every value is checked: an unknown engine, voice or language is refused with the valid options instead of being replaced.
Scope: agents:manage.
curl --request POST \
--url https://api.telleo.ai/v1/agents \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Riya – admissions",
"opening_line": "Hi {{name}}, this is Riya from Shiksha Academy. Is this a good time?",
"system_prompt": "You are Riya, an admissions counsellor…"
}
'import requests
url = "https://api.telleo.ai/v1/agents"
payload = {
"name": "Riya – admissions",
"opening_line": "Hi {{name}}, this is Riya from Shiksha Academy. Is this a good time?",
"system_prompt": "You are Riya, an admissions counsellor…"
}
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({
name: 'Riya – admissions',
opening_line: 'Hi {{name}}, this is Riya from Shiksha Academy. Is this a good time?',
system_prompt: 'You are Riya, an admissions counsellor…'
})
};
fetch('https://api.telleo.ai/v1/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"object": "agent",
"name": "<string>",
"enabled": true,
"direction": "outbound",
"language": "hinglish",
"tts_model": "<string>",
"voice": "<string>",
"opening_line": "<string>",
"system_prompt": "<string>",
"extraction_questions": [
"<string>"
],
"dispositions": [
"<string>"
],
"handoff_numbers": [
"<string>"
],
"max_call_minutes": 15,
"pace": 1.25,
"temperature": 1.005,
"voice_modulation": 1.75,
"booking_page_id": "<string>",
"send_rules": [
{}
],
"is_default": true,
"speech_cache_mode": "off",
"configuration": "full",
"uses_contact_name": true,
"variables": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"waiting_calls_canceled": 123,
"warnings": [
{
"field": "variables.date",
"code": "reserved_variable",
"message": "{{date}} in the agent's script is always filled with the current date and time; this value does not replace it. The agent receives it only as information about the contact."
}
],
"idempotent_replay": true
}Authorizations
Your AI calling API key (vak_call_…). Authorization: Bearer <key> also works.
Headers
255Body
Unique in your account, ignoring case.
128The first thing the agent says. {{placeholders}} are filled per call.
2000The agent's script and instructions.
60000outbound places calls, inbound answers your numbers, both does both.
outbound, inbound, both hinglish, hindi, english, punjabi, marathi, gujarati, bengali, tamil, telugu, kannada, malayalam, odia, a code (hi) or a tag (hi-IN). null = Hindi or Hinglish.
"hinglish"
Voice engine id from GET /voices. Default for a new agent: google.
A voice of tts_model (GET /voices). Changing tts_model needs a voice of the new engine.
Questions whose answers come back in outcome.answers.
50500Labels the agent may give a call. Empty = your account's defaults.
5064E.164 numbers the agent can transfer a caller to.
10null = 10 minutes.
1 <= x <= 30Speaking rate; null = default.
0.5 <= x <= 2Voice expressiveness; null = engine default.
0.01 <= x <= 2Pitch-range expansion; null = off.
1 <= x <= 2.5A booking page of your account the agent books on.
Response
Replay of this Idempotency-Key.
"agent"Unique in your account, ignoring case.
128outbound places calls, inbound answers your numbers, both does both.
outbound, inbound, both hinglish, hindi, english, punjabi, marathi, gujarati, bengali, tamil, telugu, kannada, malayalam, odia, a code (hi) or a tag (hi-IN). null = Hindi or Hinglish.
"hinglish"
Voice engine id from GET /voices. Default for a new agent: google.
A voice of tts_model (GET /voices). Changing tts_model needs a voice of the new engine.
The first thing the agent says. {{placeholders}} are filled per call.
2000The agent's script and instructions.
60000Questions whose answers come back in outcome.answers.
50500Labels the agent may give a call. Empty = your account's defaults.
5064E.164 numbers the agent can transfer a caller to.
10null = 10 minutes.
1 <= x <= 30Speaking rate; null = default.
0.5 <= x <= 2Voice expressiveness; null = engine default.
0.01 <= x <= 2Pitch-range expansion; null = off.
1 <= x <= 2.5A booking page of your account the agent books on.
This is your account's default agent (GET /settings/default-agent).
Read-only; set by support.
off, fixed, full summary for a key without agents:manage: system_prompt, handoff_numbers, send_rules and booking_page_id are left out.
full, summary On disable (and a PATCH of enabled): calls that were waiting for this agent and were canceled.
Non-fatal notes about what was (not) done, e.g. mobile_number_missing.
Show child attributes
Show child attributes