curl --request POST \
--url https://api.vogent.ai/api/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"defaultVoiceId": "<string>",
"defaultVersionedPrompt": {
"aiModelId": "<string>",
"name": "<string>",
"prompt": "<string>",
"flowDefinition": {
"nodes": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"transitionRules": [
{
"transitionNodeId": "<string>",
"field": "<string>",
"value": "<string>",
"values": [
"<string>"
]
}
],
"nodeData": {}
}
],
"globalContext": "<string>",
"aiOpen": true
},
"modelOptionValues": [
{
"optionId": "<string>",
"value": "<string>"
}
]
},
"defaultExtractor": {
"name": "<string>",
"extractorFieldsJsonSchema": "<string>"
},
"inboundWebhookResponse": true,
"inboundWebhookUrl": "<string>",
"maxDurationSeconds": 10800,
"timeoutMessage": "<string>",
"timeoutBehaviorConfiguration": {
"transferNumber": "<string>"
},
"openingLine": {
"content": "<string>"
},
"voiceVolumeLevel": -100,
"backgroundNoiseType": "office",
"linkedFunctionDefinitionIds": [
"<string>"
],
"linkedFunctionDefinitionInputs": [
{
"functionDefinitionId": "<string>"
}
],
"metadata": {},
"transcriberParams": {
"type": "<string>",
"keywords": [
"<string>"
]
},
"endpointDetectorConfig": {},
"ivrConfiguration": {
"versionedPromptId": "<string>",
"aiVoiceId": "<string>",
"taggingText": "<string>"
},
"language": "en",
"secondaryLanguages": [
"<string>"
],
"enableChangeLanguage": true,
"fillEmptyStringVariables": true,
"silenceHangupConfiguration": {
"silenceDurationSeconds": 123
},
"ivrSilenceHangupConfiguration": {
"silenceDurationSeconds": 123
},
"voiceOptionValues": [
{
"optionId": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://api.vogent.ai/api/agents"
payload = {
"name": "<string>",
"defaultVoiceId": "<string>",
"defaultVersionedPrompt": {
"aiModelId": "<string>",
"name": "<string>",
"prompt": "<string>",
"flowDefinition": {
"nodes": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"transitionRules": [
{
"transitionNodeId": "<string>",
"field": "<string>",
"value": "<string>",
"values": ["<string>"]
}
],
"nodeData": {}
}
],
"globalContext": "<string>",
"aiOpen": True
},
"modelOptionValues": [
{
"optionId": "<string>",
"value": "<string>"
}
]
},
"defaultExtractor": {
"name": "<string>",
"extractorFieldsJsonSchema": "<string>"
},
"inboundWebhookResponse": True,
"inboundWebhookUrl": "<string>",
"maxDurationSeconds": 10800,
"timeoutMessage": "<string>",
"timeoutBehaviorConfiguration": { "transferNumber": "<string>" },
"openingLine": { "content": "<string>" },
"voiceVolumeLevel": -100,
"backgroundNoiseType": "office",
"linkedFunctionDefinitionIds": ["<string>"],
"linkedFunctionDefinitionInputs": [{ "functionDefinitionId": "<string>" }],
"metadata": {},
"transcriberParams": {
"type": "<string>",
"keywords": ["<string>"]
},
"endpointDetectorConfig": {},
"ivrConfiguration": {
"versionedPromptId": "<string>",
"aiVoiceId": "<string>",
"taggingText": "<string>"
},
"language": "en",
"secondaryLanguages": ["<string>"],
"enableChangeLanguage": True,
"fillEmptyStringVariables": True,
"silenceHangupConfiguration": { "silenceDurationSeconds": 123 },
"ivrSilenceHangupConfiguration": { "silenceDurationSeconds": 123 },
"voiceOptionValues": [
{
"optionId": "<string>",
"value": "<string>"
}
]
}
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({
name: '<string>',
defaultVoiceId: '<string>',
defaultVersionedPrompt: {
aiModelId: '<string>',
name: '<string>',
prompt: '<string>',
flowDefinition: {
nodes: [
{
id: '<string>',
name: '<string>',
type: '<string>',
transitionRules: [
{
transitionNodeId: '<string>',
field: '<string>',
value: '<string>',
values: ['<string>']
}
],
nodeData: {}
}
],
globalContext: '<string>',
aiOpen: true
},
modelOptionValues: [{optionId: '<string>', value: '<string>'}]
},
defaultExtractor: {name: '<string>', extractorFieldsJsonSchema: '<string>'},
inboundWebhookResponse: true,
inboundWebhookUrl: '<string>',
maxDurationSeconds: 10800,
timeoutMessage: '<string>',
timeoutBehaviorConfiguration: {transferNumber: '<string>'},
openingLine: {content: '<string>'},
voiceVolumeLevel: -100,
backgroundNoiseType: 'office',
linkedFunctionDefinitionIds: ['<string>'],
linkedFunctionDefinitionInputs: [{functionDefinitionId: '<string>'}],
metadata: {},
transcriberParams: {type: '<string>', keywords: ['<string>']},
endpointDetectorConfig: {},
ivrConfiguration: {versionedPromptId: '<string>', aiVoiceId: '<string>', taggingText: '<string>'},
language: 'en',
secondaryLanguages: ['<string>'],
enableChangeLanguage: true,
fillEmptyStringVariables: true,
silenceHangupConfiguration: {silenceDurationSeconds: 123},
ivrSilenceHangupConfiguration: {silenceDurationSeconds: 123},
voiceOptionValues: [{optionId: '<string>', value: '<string>'}]
})
};
fetch('https://api.vogent.ai/api/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.vogent.ai/api/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>',
'defaultVoiceId' => '<string>',
'defaultVersionedPrompt' => [
'aiModelId' => '<string>',
'name' => '<string>',
'prompt' => '<string>',
'flowDefinition' => [
'nodes' => [
[
'id' => '<string>',
'name' => '<string>',
'type' => '<string>',
'transitionRules' => [
[
'transitionNodeId' => '<string>',
'field' => '<string>',
'value' => '<string>',
'values' => [
'<string>'
]
]
],
'nodeData' => [
]
]
],
'globalContext' => '<string>',
'aiOpen' => true
],
'modelOptionValues' => [
[
'optionId' => '<string>',
'value' => '<string>'
]
]
],
'defaultExtractor' => [
'name' => '<string>',
'extractorFieldsJsonSchema' => '<string>'
],
'inboundWebhookResponse' => true,
'inboundWebhookUrl' => '<string>',
'maxDurationSeconds' => 10800,
'timeoutMessage' => '<string>',
'timeoutBehaviorConfiguration' => [
'transferNumber' => '<string>'
],
'openingLine' => [
'content' => '<string>'
],
'voiceVolumeLevel' => -100,
'backgroundNoiseType' => 'office',
'linkedFunctionDefinitionIds' => [
'<string>'
],
'linkedFunctionDefinitionInputs' => [
[
'functionDefinitionId' => '<string>'
]
],
'metadata' => [
],
'transcriberParams' => [
'type' => '<string>',
'keywords' => [
'<string>'
]
],
'endpointDetectorConfig' => [
],
'ivrConfiguration' => [
'versionedPromptId' => '<string>',
'aiVoiceId' => '<string>',
'taggingText' => '<string>'
],
'language' => 'en',
'secondaryLanguages' => [
'<string>'
],
'enableChangeLanguage' => true,
'fillEmptyStringVariables' => true,
'silenceHangupConfiguration' => [
'silenceDurationSeconds' => 123
],
'ivrSilenceHangupConfiguration' => [
'silenceDurationSeconds' => 123
],
'voiceOptionValues' => [
[
'optionId' => '<string>',
'value' => '<string>'
]
]
]),
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.vogent.ai/api/agents"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"defaultVoiceId\": \"<string>\",\n \"defaultVersionedPrompt\": {\n \"aiModelId\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"flowDefinition\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"transitionRules\": [\n {\n \"transitionNodeId\": \"<string>\",\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"nodeData\": {}\n }\n ],\n \"globalContext\": \"<string>\",\n \"aiOpen\": true\n },\n \"modelOptionValues\": [\n {\n \"optionId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"defaultExtractor\": {\n \"name\": \"<string>\",\n \"extractorFieldsJsonSchema\": \"<string>\"\n },\n \"inboundWebhookResponse\": true,\n \"inboundWebhookUrl\": \"<string>\",\n \"maxDurationSeconds\": 10800,\n \"timeoutMessage\": \"<string>\",\n \"timeoutBehaviorConfiguration\": {\n \"transferNumber\": \"<string>\"\n },\n \"openingLine\": {\n \"content\": \"<string>\"\n },\n \"voiceVolumeLevel\": -100,\n \"backgroundNoiseType\": \"office\",\n \"linkedFunctionDefinitionIds\": [\n \"<string>\"\n ],\n \"linkedFunctionDefinitionInputs\": [\n {\n \"functionDefinitionId\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"transcriberParams\": {\n \"type\": \"<string>\",\n \"keywords\": [\n \"<string>\"\n ]\n },\n \"endpointDetectorConfig\": {},\n \"ivrConfiguration\": {\n \"versionedPromptId\": \"<string>\",\n \"aiVoiceId\": \"<string>\",\n \"taggingText\": \"<string>\"\n },\n \"language\": \"en\",\n \"secondaryLanguages\": [\n \"<string>\"\n ],\n \"enableChangeLanguage\": true,\n \"fillEmptyStringVariables\": true,\n \"silenceHangupConfiguration\": {\n \"silenceDurationSeconds\": 123\n },\n \"ivrSilenceHangupConfiguration\": {\n \"silenceDurationSeconds\": 123\n },\n \"voiceOptionValues\": [\n {\n \"optionId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\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.vogent.ai/api/agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"defaultVoiceId\": \"<string>\",\n \"defaultVersionedPrompt\": {\n \"aiModelId\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"flowDefinition\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"transitionRules\": [\n {\n \"transitionNodeId\": \"<string>\",\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"nodeData\": {}\n }\n ],\n \"globalContext\": \"<string>\",\n \"aiOpen\": true\n },\n \"modelOptionValues\": [\n {\n \"optionId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"defaultExtractor\": {\n \"name\": \"<string>\",\n \"extractorFieldsJsonSchema\": \"<string>\"\n },\n \"inboundWebhookResponse\": true,\n \"inboundWebhookUrl\": \"<string>\",\n \"maxDurationSeconds\": 10800,\n \"timeoutMessage\": \"<string>\",\n \"timeoutBehaviorConfiguration\": {\n \"transferNumber\": \"<string>\"\n },\n \"openingLine\": {\n \"content\": \"<string>\"\n },\n \"voiceVolumeLevel\": -100,\n \"backgroundNoiseType\": \"office\",\n \"linkedFunctionDefinitionIds\": [\n \"<string>\"\n ],\n \"linkedFunctionDefinitionInputs\": [\n {\n \"functionDefinitionId\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"transcriberParams\": {\n \"type\": \"<string>\",\n \"keywords\": [\n \"<string>\"\n ]\n },\n \"endpointDetectorConfig\": {},\n \"ivrConfiguration\": {\n \"versionedPromptId\": \"<string>\",\n \"aiVoiceId\": \"<string>\",\n \"taggingText\": \"<string>\"\n },\n \"language\": \"en\",\n \"secondaryLanguages\": [\n \"<string>\"\n ],\n \"enableChangeLanguage\": true,\n \"fillEmptyStringVariables\": true,\n \"silenceHangupConfiguration\": {\n \"silenceDurationSeconds\": 123\n },\n \"ivrSilenceHangupConfiguration\": {\n \"silenceDurationSeconds\": 123\n },\n \"voiceOptionValues\": [\n {\n \"optionId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vogent.ai/api/agents")
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 \"name\": \"<string>\",\n \"defaultVoiceId\": \"<string>\",\n \"defaultVersionedPrompt\": {\n \"aiModelId\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"flowDefinition\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"transitionRules\": [\n {\n \"transitionNodeId\": \"<string>\",\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"nodeData\": {}\n }\n ],\n \"globalContext\": \"<string>\",\n \"aiOpen\": true\n },\n \"modelOptionValues\": [\n {\n \"optionId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"defaultExtractor\": {\n \"name\": \"<string>\",\n \"extractorFieldsJsonSchema\": \"<string>\"\n },\n \"inboundWebhookResponse\": true,\n \"inboundWebhookUrl\": \"<string>\",\n \"maxDurationSeconds\": 10800,\n \"timeoutMessage\": \"<string>\",\n \"timeoutBehaviorConfiguration\": {\n \"transferNumber\": \"<string>\"\n },\n \"openingLine\": {\n \"content\": \"<string>\"\n },\n \"voiceVolumeLevel\": -100,\n \"backgroundNoiseType\": \"office\",\n \"linkedFunctionDefinitionIds\": [\n \"<string>\"\n ],\n \"linkedFunctionDefinitionInputs\": [\n {\n \"functionDefinitionId\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"transcriberParams\": {\n \"type\": \"<string>\",\n \"keywords\": [\n \"<string>\"\n ]\n },\n \"endpointDetectorConfig\": {},\n \"ivrConfiguration\": {\n \"versionedPromptId\": \"<string>\",\n \"aiVoiceId\": \"<string>\",\n \"taggingText\": \"<string>\"\n },\n \"language\": \"en\",\n \"secondaryLanguages\": [\n \"<string>\"\n ],\n \"enableChangeLanguage\": true,\n \"fillEmptyStringVariables\": true,\n \"silenceHangupConfiguration\": {\n \"silenceDurationSeconds\": 123\n },\n \"ivrSilenceHangupConfiguration\": {\n \"silenceDurationSeconds\": 123\n },\n \"voiceOptionValues\": [\n {\n \"optionId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"language": "<string>",
"transcriberParams": {
"type": "<string>",
"keywords": [
"<string>"
]
},
"metadata": {},
"utteranceDetectorConfig": {
"interruptionPlayTimeMs": 123
},
"endpointDetectorConfig": {},
"ivrConfiguration": {
"versionedPromptId": "<string>",
"aiVoiceId": "<string>",
"taggingText": "<string>"
},
"idleMessageConfig": {
"enabled": true,
"messages": [
"<string>"
],
"idleDurationMilliseconds": 5001,
"maxIdleMessages": 2
},
"maxDurationSeconds": 10800,
"timeoutMessage": "<string>",
"timeoutBehaviorConfiguration": {
"transferNumber": "<string>"
},
"defaultVoiceId": "<string>",
"defaultVersionedPromptId": "<string>",
"defaultExtractorId": "<string>",
"linkedFunctionDefinitions": [
{
"functionDefinitionId": "<string>",
"lifecycleMessagesOverride": {
"started": [
"<string>"
]
}
}
],
"fillEmptyStringVariables": true,
"silenceHangupConfiguration": {
"silenceDurationSeconds": 123
},
"ivrSilenceHangupConfiguration": {
"silenceDurationSeconds": 123
},
"voiceOptionValues": [
{
"optionId": "<string>",
"value": "<string>"
}
]
}Create Agent
Creates a new agent.
curl --request POST \
--url https://api.vogent.ai/api/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"defaultVoiceId": "<string>",
"defaultVersionedPrompt": {
"aiModelId": "<string>",
"name": "<string>",
"prompt": "<string>",
"flowDefinition": {
"nodes": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"transitionRules": [
{
"transitionNodeId": "<string>",
"field": "<string>",
"value": "<string>",
"values": [
"<string>"
]
}
],
"nodeData": {}
}
],
"globalContext": "<string>",
"aiOpen": true
},
"modelOptionValues": [
{
"optionId": "<string>",
"value": "<string>"
}
]
},
"defaultExtractor": {
"name": "<string>",
"extractorFieldsJsonSchema": "<string>"
},
"inboundWebhookResponse": true,
"inboundWebhookUrl": "<string>",
"maxDurationSeconds": 10800,
"timeoutMessage": "<string>",
"timeoutBehaviorConfiguration": {
"transferNumber": "<string>"
},
"openingLine": {
"content": "<string>"
},
"voiceVolumeLevel": -100,
"backgroundNoiseType": "office",
"linkedFunctionDefinitionIds": [
"<string>"
],
"linkedFunctionDefinitionInputs": [
{
"functionDefinitionId": "<string>"
}
],
"metadata": {},
"transcriberParams": {
"type": "<string>",
"keywords": [
"<string>"
]
},
"endpointDetectorConfig": {},
"ivrConfiguration": {
"versionedPromptId": "<string>",
"aiVoiceId": "<string>",
"taggingText": "<string>"
},
"language": "en",
"secondaryLanguages": [
"<string>"
],
"enableChangeLanguage": true,
"fillEmptyStringVariables": true,
"silenceHangupConfiguration": {
"silenceDurationSeconds": 123
},
"ivrSilenceHangupConfiguration": {
"silenceDurationSeconds": 123
},
"voiceOptionValues": [
{
"optionId": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://api.vogent.ai/api/agents"
payload = {
"name": "<string>",
"defaultVoiceId": "<string>",
"defaultVersionedPrompt": {
"aiModelId": "<string>",
"name": "<string>",
"prompt": "<string>",
"flowDefinition": {
"nodes": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"transitionRules": [
{
"transitionNodeId": "<string>",
"field": "<string>",
"value": "<string>",
"values": ["<string>"]
}
],
"nodeData": {}
}
],
"globalContext": "<string>",
"aiOpen": True
},
"modelOptionValues": [
{
"optionId": "<string>",
"value": "<string>"
}
]
},
"defaultExtractor": {
"name": "<string>",
"extractorFieldsJsonSchema": "<string>"
},
"inboundWebhookResponse": True,
"inboundWebhookUrl": "<string>",
"maxDurationSeconds": 10800,
"timeoutMessage": "<string>",
"timeoutBehaviorConfiguration": { "transferNumber": "<string>" },
"openingLine": { "content": "<string>" },
"voiceVolumeLevel": -100,
"backgroundNoiseType": "office",
"linkedFunctionDefinitionIds": ["<string>"],
"linkedFunctionDefinitionInputs": [{ "functionDefinitionId": "<string>" }],
"metadata": {},
"transcriberParams": {
"type": "<string>",
"keywords": ["<string>"]
},
"endpointDetectorConfig": {},
"ivrConfiguration": {
"versionedPromptId": "<string>",
"aiVoiceId": "<string>",
"taggingText": "<string>"
},
"language": "en",
"secondaryLanguages": ["<string>"],
"enableChangeLanguage": True,
"fillEmptyStringVariables": True,
"silenceHangupConfiguration": { "silenceDurationSeconds": 123 },
"ivrSilenceHangupConfiguration": { "silenceDurationSeconds": 123 },
"voiceOptionValues": [
{
"optionId": "<string>",
"value": "<string>"
}
]
}
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({
name: '<string>',
defaultVoiceId: '<string>',
defaultVersionedPrompt: {
aiModelId: '<string>',
name: '<string>',
prompt: '<string>',
flowDefinition: {
nodes: [
{
id: '<string>',
name: '<string>',
type: '<string>',
transitionRules: [
{
transitionNodeId: '<string>',
field: '<string>',
value: '<string>',
values: ['<string>']
}
],
nodeData: {}
}
],
globalContext: '<string>',
aiOpen: true
},
modelOptionValues: [{optionId: '<string>', value: '<string>'}]
},
defaultExtractor: {name: '<string>', extractorFieldsJsonSchema: '<string>'},
inboundWebhookResponse: true,
inboundWebhookUrl: '<string>',
maxDurationSeconds: 10800,
timeoutMessage: '<string>',
timeoutBehaviorConfiguration: {transferNumber: '<string>'},
openingLine: {content: '<string>'},
voiceVolumeLevel: -100,
backgroundNoiseType: 'office',
linkedFunctionDefinitionIds: ['<string>'],
linkedFunctionDefinitionInputs: [{functionDefinitionId: '<string>'}],
metadata: {},
transcriberParams: {type: '<string>', keywords: ['<string>']},
endpointDetectorConfig: {},
ivrConfiguration: {versionedPromptId: '<string>', aiVoiceId: '<string>', taggingText: '<string>'},
language: 'en',
secondaryLanguages: ['<string>'],
enableChangeLanguage: true,
fillEmptyStringVariables: true,
silenceHangupConfiguration: {silenceDurationSeconds: 123},
ivrSilenceHangupConfiguration: {silenceDurationSeconds: 123},
voiceOptionValues: [{optionId: '<string>', value: '<string>'}]
})
};
fetch('https://api.vogent.ai/api/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.vogent.ai/api/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>',
'defaultVoiceId' => '<string>',
'defaultVersionedPrompt' => [
'aiModelId' => '<string>',
'name' => '<string>',
'prompt' => '<string>',
'flowDefinition' => [
'nodes' => [
[
'id' => '<string>',
'name' => '<string>',
'type' => '<string>',
'transitionRules' => [
[
'transitionNodeId' => '<string>',
'field' => '<string>',
'value' => '<string>',
'values' => [
'<string>'
]
]
],
'nodeData' => [
]
]
],
'globalContext' => '<string>',
'aiOpen' => true
],
'modelOptionValues' => [
[
'optionId' => '<string>',
'value' => '<string>'
]
]
],
'defaultExtractor' => [
'name' => '<string>',
'extractorFieldsJsonSchema' => '<string>'
],
'inboundWebhookResponse' => true,
'inboundWebhookUrl' => '<string>',
'maxDurationSeconds' => 10800,
'timeoutMessage' => '<string>',
'timeoutBehaviorConfiguration' => [
'transferNumber' => '<string>'
],
'openingLine' => [
'content' => '<string>'
],
'voiceVolumeLevel' => -100,
'backgroundNoiseType' => 'office',
'linkedFunctionDefinitionIds' => [
'<string>'
],
'linkedFunctionDefinitionInputs' => [
[
'functionDefinitionId' => '<string>'
]
],
'metadata' => [
],
'transcriberParams' => [
'type' => '<string>',
'keywords' => [
'<string>'
]
],
'endpointDetectorConfig' => [
],
'ivrConfiguration' => [
'versionedPromptId' => '<string>',
'aiVoiceId' => '<string>',
'taggingText' => '<string>'
],
'language' => 'en',
'secondaryLanguages' => [
'<string>'
],
'enableChangeLanguage' => true,
'fillEmptyStringVariables' => true,
'silenceHangupConfiguration' => [
'silenceDurationSeconds' => 123
],
'ivrSilenceHangupConfiguration' => [
'silenceDurationSeconds' => 123
],
'voiceOptionValues' => [
[
'optionId' => '<string>',
'value' => '<string>'
]
]
]),
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.vogent.ai/api/agents"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"defaultVoiceId\": \"<string>\",\n \"defaultVersionedPrompt\": {\n \"aiModelId\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"flowDefinition\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"transitionRules\": [\n {\n \"transitionNodeId\": \"<string>\",\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"nodeData\": {}\n }\n ],\n \"globalContext\": \"<string>\",\n \"aiOpen\": true\n },\n \"modelOptionValues\": [\n {\n \"optionId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"defaultExtractor\": {\n \"name\": \"<string>\",\n \"extractorFieldsJsonSchema\": \"<string>\"\n },\n \"inboundWebhookResponse\": true,\n \"inboundWebhookUrl\": \"<string>\",\n \"maxDurationSeconds\": 10800,\n \"timeoutMessage\": \"<string>\",\n \"timeoutBehaviorConfiguration\": {\n \"transferNumber\": \"<string>\"\n },\n \"openingLine\": {\n \"content\": \"<string>\"\n },\n \"voiceVolumeLevel\": -100,\n \"backgroundNoiseType\": \"office\",\n \"linkedFunctionDefinitionIds\": [\n \"<string>\"\n ],\n \"linkedFunctionDefinitionInputs\": [\n {\n \"functionDefinitionId\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"transcriberParams\": {\n \"type\": \"<string>\",\n \"keywords\": [\n \"<string>\"\n ]\n },\n \"endpointDetectorConfig\": {},\n \"ivrConfiguration\": {\n \"versionedPromptId\": \"<string>\",\n \"aiVoiceId\": \"<string>\",\n \"taggingText\": \"<string>\"\n },\n \"language\": \"en\",\n \"secondaryLanguages\": [\n \"<string>\"\n ],\n \"enableChangeLanguage\": true,\n \"fillEmptyStringVariables\": true,\n \"silenceHangupConfiguration\": {\n \"silenceDurationSeconds\": 123\n },\n \"ivrSilenceHangupConfiguration\": {\n \"silenceDurationSeconds\": 123\n },\n \"voiceOptionValues\": [\n {\n \"optionId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\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.vogent.ai/api/agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"defaultVoiceId\": \"<string>\",\n \"defaultVersionedPrompt\": {\n \"aiModelId\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"flowDefinition\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"transitionRules\": [\n {\n \"transitionNodeId\": \"<string>\",\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"nodeData\": {}\n }\n ],\n \"globalContext\": \"<string>\",\n \"aiOpen\": true\n },\n \"modelOptionValues\": [\n {\n \"optionId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"defaultExtractor\": {\n \"name\": \"<string>\",\n \"extractorFieldsJsonSchema\": \"<string>\"\n },\n \"inboundWebhookResponse\": true,\n \"inboundWebhookUrl\": \"<string>\",\n \"maxDurationSeconds\": 10800,\n \"timeoutMessage\": \"<string>\",\n \"timeoutBehaviorConfiguration\": {\n \"transferNumber\": \"<string>\"\n },\n \"openingLine\": {\n \"content\": \"<string>\"\n },\n \"voiceVolumeLevel\": -100,\n \"backgroundNoiseType\": \"office\",\n \"linkedFunctionDefinitionIds\": [\n \"<string>\"\n ],\n \"linkedFunctionDefinitionInputs\": [\n {\n \"functionDefinitionId\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"transcriberParams\": {\n \"type\": \"<string>\",\n \"keywords\": [\n \"<string>\"\n ]\n },\n \"endpointDetectorConfig\": {},\n \"ivrConfiguration\": {\n \"versionedPromptId\": \"<string>\",\n \"aiVoiceId\": \"<string>\",\n \"taggingText\": \"<string>\"\n },\n \"language\": \"en\",\n \"secondaryLanguages\": [\n \"<string>\"\n ],\n \"enableChangeLanguage\": true,\n \"fillEmptyStringVariables\": true,\n \"silenceHangupConfiguration\": {\n \"silenceDurationSeconds\": 123\n },\n \"ivrSilenceHangupConfiguration\": {\n \"silenceDurationSeconds\": 123\n },\n \"voiceOptionValues\": [\n {\n \"optionId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vogent.ai/api/agents")
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 \"name\": \"<string>\",\n \"defaultVoiceId\": \"<string>\",\n \"defaultVersionedPrompt\": {\n \"aiModelId\": \"<string>\",\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"flowDefinition\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"transitionRules\": [\n {\n \"transitionNodeId\": \"<string>\",\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"nodeData\": {}\n }\n ],\n \"globalContext\": \"<string>\",\n \"aiOpen\": true\n },\n \"modelOptionValues\": [\n {\n \"optionId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"defaultExtractor\": {\n \"name\": \"<string>\",\n \"extractorFieldsJsonSchema\": \"<string>\"\n },\n \"inboundWebhookResponse\": true,\n \"inboundWebhookUrl\": \"<string>\",\n \"maxDurationSeconds\": 10800,\n \"timeoutMessage\": \"<string>\",\n \"timeoutBehaviorConfiguration\": {\n \"transferNumber\": \"<string>\"\n },\n \"openingLine\": {\n \"content\": \"<string>\"\n },\n \"voiceVolumeLevel\": -100,\n \"backgroundNoiseType\": \"office\",\n \"linkedFunctionDefinitionIds\": [\n \"<string>\"\n ],\n \"linkedFunctionDefinitionInputs\": [\n {\n \"functionDefinitionId\": \"<string>\"\n }\n ],\n \"metadata\": {},\n \"transcriberParams\": {\n \"type\": \"<string>\",\n \"keywords\": [\n \"<string>\"\n ]\n },\n \"endpointDetectorConfig\": {},\n \"ivrConfiguration\": {\n \"versionedPromptId\": \"<string>\",\n \"aiVoiceId\": \"<string>\",\n \"taggingText\": \"<string>\"\n },\n \"language\": \"en\",\n \"secondaryLanguages\": [\n \"<string>\"\n ],\n \"enableChangeLanguage\": true,\n \"fillEmptyStringVariables\": true,\n \"silenceHangupConfiguration\": {\n \"silenceDurationSeconds\": 123\n },\n \"ivrSilenceHangupConfiguration\": {\n \"silenceDurationSeconds\": 123\n },\n \"voiceOptionValues\": [\n {\n \"optionId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"language": "<string>",
"transcriberParams": {
"type": "<string>",
"keywords": [
"<string>"
]
},
"metadata": {},
"utteranceDetectorConfig": {
"interruptionPlayTimeMs": 123
},
"endpointDetectorConfig": {},
"ivrConfiguration": {
"versionedPromptId": "<string>",
"aiVoiceId": "<string>",
"taggingText": "<string>"
},
"idleMessageConfig": {
"enabled": true,
"messages": [
"<string>"
],
"idleDurationMilliseconds": 5001,
"maxIdleMessages": 2
},
"maxDurationSeconds": 10800,
"timeoutMessage": "<string>",
"timeoutBehaviorConfiguration": {
"transferNumber": "<string>"
},
"defaultVoiceId": "<string>",
"defaultVersionedPromptId": "<string>",
"defaultExtractorId": "<string>",
"linkedFunctionDefinitions": [
{
"functionDefinitionId": "<string>",
"lifecycleMessagesOverride": {
"started": [
"<string>"
]
}
}
],
"fillEmptyStringVariables": true,
"silenceHangupConfiguration": {
"silenceDurationSeconds": 123
},
"ivrSilenceHangupConfiguration": {
"silenceDurationSeconds": 123
},
"voiceOptionValues": [
{
"optionId": "<string>",
"value": "<string>"
}
]
}Authorizations
In the form Bearer <api_key_here>. You can find your api key in your dashboard.
Body
Create a new agent
The name of the agent.
The ID of the voice to use.
The default versioned prompt to use for this agent.
Show child attributes
Show child attributes
The default extractor to use for this agent.
Show child attributes
Show child attributes
The maximum duration of the call in seconds.
An optional message to play via TTS before hanging up when the call reaches its max duration timeout.
Configuration for the behavior when a call reaches its max duration timeout.
Show child attributes
Show child attributes
Details about the Agent's opening line. If unspecified, or null no opening line will be created.
Show child attributes
Show child attributes
A value, generally between -300 and 300, indicating the volume level to use for the voice. The default is -100.
The background audio that's used by the agent.
noise, office, silence The function definitions that should be available to this agent (deprecated, use linkedFunctionDefinitionInputs instead)
The function definitions that should be available to this agent with optional lifecycle message overrides
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
Configuration for endpoint detection to determine when a user has finished speaking. If not specified, will default to a semantic detector in the default mode.
Show child attributes
Show child attributes
The configuration for IVR detection and navigation including detection type, prompt, voice, and tagging settings.
Show child attributes
Show child attributes
The language to use for the agent.
Additional languages the agent can switch to during a call.
Whether the agent can use the change_language tool to switch languages during a call.
If true, variables that are not specified will be filled with empty strings instead of being left as template placeholders.
Configuration for automatically hanging up the call after a period of silence.
Show child attributes
Show child attributes
Configuration for automatically hanging up the call after a period of silence while in IVR mode.
Show child attributes
Show child attributes
An optional configuration for the voice being used.
Show child attributes
Show child attributes
Response
Successful operation
The language to use for the agent.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Configuration for endpoint detection to determine when a user has finished speaking.
Show child attributes
Show child attributes
The configuration for IVR detection and navigation including detection type, prompt, voice, and tagging settings.
Show child attributes
Show child attributes
Configuration for idle messages that the agent can say when the user is silent.
Show child attributes
Show child attributes
The maximum duration of the call in seconds.
An optional message to play via TTS before hanging up when the call reaches its max duration timeout.
Configuration for the behavior when a call reaches its max duration timeout.
Show child attributes
Show child attributes
The default voice ID to use for the agent.
The default versioned prompt ID to use for the agent.
The default extractor ID to use for the agent.
The function definitions that should be available to this agent.
Show child attributes
Show child attributes
If true, variables that are not specified will be filled with empty strings instead of being left as template placeholders.
Configuration for automatically hanging up the call after a period of silence.
Show child attributes
Show child attributes
Configuration for automatically hanging up the call after a period of silence while in IVR mode.
Show child attributes
Show child attributes
The configuration values for the voice being used by the agent.
Show child attributes
Show child attributes