Create Agent
curl --request POST \
--url https://api.vocode.dev/v1/agents/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voice": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"language": "en",
"actions": [],
"initial_message": "<string>",
"webhook": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vector_database": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"interrupt_sensitivity": "low",
"context_endpoint": "<string>",
"noise_suppression": false,
"endpointing_sensitivity": "auto",
"ivr_navigation_mode": "off",
"conversation_speed": 1,
"initial_message_delay": 0,
"openai_model_name_override": "<string>",
"ask_if_human_present_on_idle": false,
"openai_account_connection": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credentials": {
"openai_api_key": "<string>"
},
"type": "account_connection_openai"
},
"run_do_not_call_detection": false,
"llm_fallback": {
"model_name": "<string>"
},
"deepgram_keywords": {},
"idle_time_seconds": 123,
"llm_temperature": 0
}
'import requests
url = "https://api.vocode.dev/v1/agents/create"
payload = {
"prompt": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voice": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"language": "en",
"actions": [],
"initial_message": "<string>",
"webhook": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vector_database": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"interrupt_sensitivity": "low",
"context_endpoint": "<string>",
"noise_suppression": False,
"endpointing_sensitivity": "auto",
"ivr_navigation_mode": "off",
"conversation_speed": 1,
"initial_message_delay": 0,
"openai_model_name_override": "<string>",
"ask_if_human_present_on_idle": False,
"openai_account_connection": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credentials": { "openai_api_key": "<string>" },
"type": "account_connection_openai"
},
"run_do_not_call_detection": False,
"llm_fallback": { "model_name": "<string>" },
"deepgram_keywords": {},
"idle_time_seconds": 123,
"llm_temperature": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
voice: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
language: 'en',
actions: [],
initial_message: '<string>',
webhook: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
vector_database: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
interrupt_sensitivity: 'low',
context_endpoint: '<string>',
noise_suppression: false,
endpointing_sensitivity: 'auto',
ivr_navigation_mode: 'off',
conversation_speed: 1,
initial_message_delay: 0,
openai_model_name_override: '<string>',
ask_if_human_present_on_idle: false,
openai_account_connection: {
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
credentials: {openai_api_key: '<string>'},
type: 'account_connection_openai'
},
run_do_not_call_detection: false,
llm_fallback: {model_name: '<string>'},
deepgram_keywords: {},
idle_time_seconds: 123,
llm_temperature: 0
})
};
fetch('https://api.vocode.dev/v1/agents/create', 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.vocode.dev/v1/agents/create",
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([
'prompt' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'voice' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'language' => 'en',
'actions' => [
],
'initial_message' => '<string>',
'webhook' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'vector_database' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'interrupt_sensitivity' => 'low',
'context_endpoint' => '<string>',
'noise_suppression' => false,
'endpointing_sensitivity' => 'auto',
'ivr_navigation_mode' => 'off',
'conversation_speed' => 1,
'initial_message_delay' => 0,
'openai_model_name_override' => '<string>',
'ask_if_human_present_on_idle' => false,
'openai_account_connection' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'credentials' => [
'openai_api_key' => '<string>'
],
'type' => 'account_connection_openai'
],
'run_do_not_call_detection' => false,
'llm_fallback' => [
'model_name' => '<string>'
],
'deepgram_keywords' => [
],
'idle_time_seconds' => 123,
'llm_temperature' => 0
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.vocode.dev/v1/agents/create"
payload := strings.NewReader("{\n \"prompt\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"language\": \"en\",\n \"actions\": [],\n \"initial_message\": \"<string>\",\n \"webhook\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vector_database\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"interrupt_sensitivity\": \"low\",\n \"context_endpoint\": \"<string>\",\n \"noise_suppression\": false,\n \"endpointing_sensitivity\": \"auto\",\n \"ivr_navigation_mode\": \"off\",\n \"conversation_speed\": 1,\n \"initial_message_delay\": 0,\n \"openai_model_name_override\": \"<string>\",\n \"ask_if_human_present_on_idle\": false,\n \"openai_account_connection\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credentials\": {\n \"openai_api_key\": \"<string>\"\n },\n \"type\": \"account_connection_openai\"\n },\n \"run_do_not_call_detection\": false,\n \"llm_fallback\": {\n \"model_name\": \"<string>\"\n },\n \"deepgram_keywords\": {},\n \"idle_time_seconds\": 123,\n \"llm_temperature\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.vocode.dev/v1/agents/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"language\": \"en\",\n \"actions\": [],\n \"initial_message\": \"<string>\",\n \"webhook\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vector_database\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"interrupt_sensitivity\": \"low\",\n \"context_endpoint\": \"<string>\",\n \"noise_suppression\": false,\n \"endpointing_sensitivity\": \"auto\",\n \"ivr_navigation_mode\": \"off\",\n \"conversation_speed\": 1,\n \"initial_message_delay\": 0,\n \"openai_model_name_override\": \"<string>\",\n \"ask_if_human_present_on_idle\": false,\n \"openai_account_connection\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credentials\": {\n \"openai_api_key\": \"<string>\"\n },\n \"type\": \"account_connection_openai\"\n },\n \"run_do_not_call_detection\": false,\n \"llm_fallback\": {\n \"model_name\": \"<string>\"\n },\n \"deepgram_keywords\": {},\n \"idle_time_seconds\": 123,\n \"llm_temperature\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vocode.dev/v1/agents/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"language\": \"en\",\n \"actions\": [],\n \"initial_message\": \"<string>\",\n \"webhook\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vector_database\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"interrupt_sensitivity\": \"low\",\n \"context_endpoint\": \"<string>\",\n \"noise_suppression\": false,\n \"endpointing_sensitivity\": \"auto\",\n \"ivr_navigation_mode\": \"off\",\n \"conversation_speed\": 1,\n \"initial_message_delay\": 0,\n \"openai_model_name_override\": \"<string>\",\n \"ask_if_human_present_on_idle\": false,\n \"openai_account_connection\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credentials\": {\n \"openai_api_key\": \"<string>\"\n },\n \"type\": \"account_connection_openai\"\n },\n \"run_do_not_call_detection\": false,\n \"llm_fallback\": {\n \"model_name\": \"<string>\"\n },\n \"deepgram_keywords\": {},\n \"idle_time_seconds\": 123,\n \"llm_temperature\": 0\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"prompt": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content": "",
"collect_fields": [
{
"field_type": "field_type_email",
"label": "<string>",
"name": "<string>",
"description": "<string>"
}
],
"context_endpoint": "<string>",
"prompt_template": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required_context_keys": [
"<string>"
],
"label": ""
}
},
"actions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "action_transfer_call",
"config": {
"phone_number": "<string>"
},
"action_trigger": {
"type": "action_trigger_function_call",
"config": {}
}
}
],
"voice": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "voice_azure",
"voice_name": "<string>",
"pitch": 0,
"rate": 15
},
"name": "<string>",
"language": "en",
"initial_message": "<string>",
"webhook": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subscriptions": [],
"url": "<string>",
"method": "POST"
},
"vector_database": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "vector_database_pinecone",
"index": "<string>",
"api_key": "<string>",
"api_environment": "<string>"
},
"interrupt_sensitivity": "low",
"context_endpoint": "<string>",
"noise_suppression": false,
"endpointing_sensitivity": "auto",
"ivr_navigation_mode": "off",
"conversation_speed": 1,
"initial_message_delay": 0,
"openai_model_name_override": "<string>",
"ask_if_human_present_on_idle": false,
"openai_account_connection": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credentials": {
"openai_api_key": "<string>"
},
"type": "account_connection_openai"
},
"run_do_not_call_detection": false,
"llm_fallback": {
"model_name": "<string>"
},
"deepgram_keywords": {},
"idle_time_seconds": 123,
"llm_temperature": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Agents
Create Agent
POST
/
v1
/
agents
/
create
Create Agent
curl --request POST \
--url https://api.vocode.dev/v1/agents/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voice": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"language": "en",
"actions": [],
"initial_message": "<string>",
"webhook": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vector_database": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"interrupt_sensitivity": "low",
"context_endpoint": "<string>",
"noise_suppression": false,
"endpointing_sensitivity": "auto",
"ivr_navigation_mode": "off",
"conversation_speed": 1,
"initial_message_delay": 0,
"openai_model_name_override": "<string>",
"ask_if_human_present_on_idle": false,
"openai_account_connection": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credentials": {
"openai_api_key": "<string>"
},
"type": "account_connection_openai"
},
"run_do_not_call_detection": false,
"llm_fallback": {
"model_name": "<string>"
},
"deepgram_keywords": {},
"idle_time_seconds": 123,
"llm_temperature": 0
}
'import requests
url = "https://api.vocode.dev/v1/agents/create"
payload = {
"prompt": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voice": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"language": "en",
"actions": [],
"initial_message": "<string>",
"webhook": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vector_database": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"interrupt_sensitivity": "low",
"context_endpoint": "<string>",
"noise_suppression": False,
"endpointing_sensitivity": "auto",
"ivr_navigation_mode": "off",
"conversation_speed": 1,
"initial_message_delay": 0,
"openai_model_name_override": "<string>",
"ask_if_human_present_on_idle": False,
"openai_account_connection": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credentials": { "openai_api_key": "<string>" },
"type": "account_connection_openai"
},
"run_do_not_call_detection": False,
"llm_fallback": { "model_name": "<string>" },
"deepgram_keywords": {},
"idle_time_seconds": 123,
"llm_temperature": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
voice: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
language: 'en',
actions: [],
initial_message: '<string>',
webhook: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
vector_database: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
interrupt_sensitivity: 'low',
context_endpoint: '<string>',
noise_suppression: false,
endpointing_sensitivity: 'auto',
ivr_navigation_mode: 'off',
conversation_speed: 1,
initial_message_delay: 0,
openai_model_name_override: '<string>',
ask_if_human_present_on_idle: false,
openai_account_connection: {
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
credentials: {openai_api_key: '<string>'},
type: 'account_connection_openai'
},
run_do_not_call_detection: false,
llm_fallback: {model_name: '<string>'},
deepgram_keywords: {},
idle_time_seconds: 123,
llm_temperature: 0
})
};
fetch('https://api.vocode.dev/v1/agents/create', 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.vocode.dev/v1/agents/create",
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([
'prompt' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'voice' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'language' => 'en',
'actions' => [
],
'initial_message' => '<string>',
'webhook' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'vector_database' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'interrupt_sensitivity' => 'low',
'context_endpoint' => '<string>',
'noise_suppression' => false,
'endpointing_sensitivity' => 'auto',
'ivr_navigation_mode' => 'off',
'conversation_speed' => 1,
'initial_message_delay' => 0,
'openai_model_name_override' => '<string>',
'ask_if_human_present_on_idle' => false,
'openai_account_connection' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'credentials' => [
'openai_api_key' => '<string>'
],
'type' => 'account_connection_openai'
],
'run_do_not_call_detection' => false,
'llm_fallback' => [
'model_name' => '<string>'
],
'deepgram_keywords' => [
],
'idle_time_seconds' => 123,
'llm_temperature' => 0
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.vocode.dev/v1/agents/create"
payload := strings.NewReader("{\n \"prompt\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"language\": \"en\",\n \"actions\": [],\n \"initial_message\": \"<string>\",\n \"webhook\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vector_database\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"interrupt_sensitivity\": \"low\",\n \"context_endpoint\": \"<string>\",\n \"noise_suppression\": false,\n \"endpointing_sensitivity\": \"auto\",\n \"ivr_navigation_mode\": \"off\",\n \"conversation_speed\": 1,\n \"initial_message_delay\": 0,\n \"openai_model_name_override\": \"<string>\",\n \"ask_if_human_present_on_idle\": false,\n \"openai_account_connection\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credentials\": {\n \"openai_api_key\": \"<string>\"\n },\n \"type\": \"account_connection_openai\"\n },\n \"run_do_not_call_detection\": false,\n \"llm_fallback\": {\n \"model_name\": \"<string>\"\n },\n \"deepgram_keywords\": {},\n \"idle_time_seconds\": 123,\n \"llm_temperature\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.vocode.dev/v1/agents/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"language\": \"en\",\n \"actions\": [],\n \"initial_message\": \"<string>\",\n \"webhook\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vector_database\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"interrupt_sensitivity\": \"low\",\n \"context_endpoint\": \"<string>\",\n \"noise_suppression\": false,\n \"endpointing_sensitivity\": \"auto\",\n \"ivr_navigation_mode\": \"off\",\n \"conversation_speed\": 1,\n \"initial_message_delay\": 0,\n \"openai_model_name_override\": \"<string>\",\n \"ask_if_human_present_on_idle\": false,\n \"openai_account_connection\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credentials\": {\n \"openai_api_key\": \"<string>\"\n },\n \"type\": \"account_connection_openai\"\n },\n \"run_do_not_call_detection\": false,\n \"llm_fallback\": {\n \"model_name\": \"<string>\"\n },\n \"deepgram_keywords\": {},\n \"idle_time_seconds\": 123,\n \"llm_temperature\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vocode.dev/v1/agents/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"voice\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"language\": \"en\",\n \"actions\": [],\n \"initial_message\": \"<string>\",\n \"webhook\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"vector_database\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"interrupt_sensitivity\": \"low\",\n \"context_endpoint\": \"<string>\",\n \"noise_suppression\": false,\n \"endpointing_sensitivity\": \"auto\",\n \"ivr_navigation_mode\": \"off\",\n \"conversation_speed\": 1,\n \"initial_message_delay\": 0,\n \"openai_model_name_override\": \"<string>\",\n \"ask_if_human_present_on_idle\": false,\n \"openai_account_connection\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"credentials\": {\n \"openai_api_key\": \"<string>\"\n },\n \"type\": \"account_connection_openai\"\n },\n \"run_do_not_call_detection\": false,\n \"llm_fallback\": {\n \"model_name\": \"<string>\"\n },\n \"deepgram_keywords\": {},\n \"idle_time_seconds\": 123,\n \"llm_temperature\": 0\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"prompt": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content": "",
"collect_fields": [
{
"field_type": "field_type_email",
"label": "<string>",
"name": "<string>",
"description": "<string>"
}
],
"context_endpoint": "<string>",
"prompt_template": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required_context_keys": [
"<string>"
],
"label": ""
}
},
"actions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "action_transfer_call",
"config": {
"phone_number": "<string>"
},
"action_trigger": {
"type": "action_trigger_function_call",
"config": {}
}
}
],
"voice": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "voice_azure",
"voice_name": "<string>",
"pitch": 0,
"rate": 15
},
"name": "<string>",
"language": "en",
"initial_message": "<string>",
"webhook": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subscriptions": [],
"url": "<string>",
"method": "POST"
},
"vector_database": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "vector_database_pinecone",
"index": "<string>",
"api_key": "<string>",
"api_environment": "<string>"
},
"interrupt_sensitivity": "low",
"context_endpoint": "<string>",
"noise_suppression": false,
"endpointing_sensitivity": "auto",
"ivr_navigation_mode": "off",
"conversation_speed": 1,
"initial_message_delay": 0,
"openai_model_name_override": "<string>",
"ask_if_human_present_on_idle": false,
"openai_account_connection": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credentials": {
"openai_api_key": "<string>"
},
"type": "account_connection_openai"
},
"run_do_not_call_detection": false,
"llm_fallback": {
"model_name": "<string>"
},
"deepgram_keywords": {},
"idle_time_seconds": 123,
"llm_temperature": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
voice
string<uuid>AzureVoiceParams · objectRimeVoiceParams · objectElevenLabsVoiceParams · objectPlayHtVoiceParams · objectVocodeVoiceParams · object
required
Available options:
en, es, de, hi, pt, fr, nl, id, it, ja, ko actions
(string<uuid> | TransferCallActionParams · object | EndConversationActionParams · object | DTMFActionParams · object | AddToConferenceActionParams · object | SetHoldActionParams · object | ExternalActionParams · object)[]
Available options:
low, high Available options:
auto, relaxed, sensitive Available options:
default, off Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Successful Response
Show child attributes
Show child attributes
actions
(TransferCallAction · object | EndConversationAction · object | DTMFAction · object | AddToConferenceAction · object | SetHoldAction · object | ExternalAction · object)[]
required
- TransferCallAction
- EndConversationAction
- DTMFAction
- AddToConferenceAction
- SetHoldAction
- ExternalAction
Show child attributes
Show child attributes
- AzureVoice
- RimeVoice
- ElevenLabsVoice
- PlayHtVoice
- VocodeVoice
Show child attributes
Show child attributes
Available options:
en, es, de, hi, pt, fr, nl, id, it, ja, ko Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
low, high Available options:
auto, relaxed, sensitive Available options:
default, off Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
