curl --request POST \
--url https://api.tryhamsa.com/v2/voice-agents \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Customer Support Agent",
"type": "Single Prompt",
"conversation": {
"greetingMessage": "Welcome! How may I assist you?",
"greetingMessageType": "TEXT",
"preamble": "You are a customer support assistant.",
"pokeMessages": [
"Are you still there?"
],
"params": {},
"alignment": {
"greetingMessage": "ltr",
"preamble": "ltr"
}
},
"voice": {
"voiceId": "en-US-Neural2-A",
"lang": "en"
},
"llm": {
"provider": "openai",
"model": "gpt-4",
"temperature": 0.7,
"baseUrl": "https://api.example.com",
"apiKey": "sk-..."
},
"callSettings": {
"noiseCancellation": "telephony_optimized",
"cancelNoisePer": "conversation",
"interrupt": true,
"responseDelay": 400,
"minInterruptionDuration": 0.5,
"vadActivationThreshold": 0.5,
"userInactivityTimeout": 15,
"maxCallDuration": 300,
"silenceThreshold": 800,
"backgroundNoise": false,
"enableAutoGainControl": false,
"sendDenoisedToStt": false,
"waitForUserToSpeakFirst": 0,
"thinkingVoice": false,
"speakerIdentification": false,
"agenticRag": false,
"languageDialectSwitcher": false,
"genderDetection": false,
"smartCallEnd": false
},
"tools": [],
"knowledgeBaseItemsIds": [
"48f7656f-098b-4c43-b165-7cfd2cc8ac30"
],
"voiceDictionaryIds": [
"48f7656f-098b-4c43-b165-7cfd2cc8ac30"
],
"phoneNumber": {
"type": "TWILIO",
"id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30"
},
"webhookUrl": "https://example.com/webhook",
"webhookAuth": {},
"workflow": {
"nodes": [
{
"id": "2ZHj3IUpJFc-83H2-f8d3",
"type": "start",
"label": "Start",
"message": "Hello, how can I help you today?",
"messageType": "prompt",
"position": {
"x": 0,
"y": 0
},
"metadata": {
"version": 1
},
"transitions": []
}
],
"edges": [],
"customVariables": [
{
"id": "z5QsyxUbrKPjYMGaMj1e1",
"name": "customer_name",
"dataType": "string",
"description": "",
"defaultValue": "john",
"extractionPrompt": "",
"enumValues": []
}
]
},
"outcomeResponseShape": {}
}
'import requests
url = "https://api.tryhamsa.com/v2/voice-agents"
payload = {
"name": "Customer Support Agent",
"type": "Single Prompt",
"conversation": {
"greetingMessage": "Welcome! How may I assist you?",
"greetingMessageType": "TEXT",
"preamble": "You are a customer support assistant.",
"pokeMessages": ["Are you still there?"],
"params": {},
"alignment": {
"greetingMessage": "ltr",
"preamble": "ltr"
}
},
"voice": {
"voiceId": "en-US-Neural2-A",
"lang": "en"
},
"llm": {
"provider": "openai",
"model": "gpt-4",
"temperature": 0.7,
"baseUrl": "https://api.example.com",
"apiKey": "sk-..."
},
"callSettings": {
"noiseCancellation": "telephony_optimized",
"cancelNoisePer": "conversation",
"interrupt": True,
"responseDelay": 400,
"minInterruptionDuration": 0.5,
"vadActivationThreshold": 0.5,
"userInactivityTimeout": 15,
"maxCallDuration": 300,
"silenceThreshold": 800,
"backgroundNoise": False,
"enableAutoGainControl": False,
"sendDenoisedToStt": False,
"waitForUserToSpeakFirst": 0,
"thinkingVoice": False,
"speakerIdentification": False,
"agenticRag": False,
"languageDialectSwitcher": False,
"genderDetection": False,
"smartCallEnd": False
},
"tools": [],
"knowledgeBaseItemsIds": ["48f7656f-098b-4c43-b165-7cfd2cc8ac30"],
"voiceDictionaryIds": ["48f7656f-098b-4c43-b165-7cfd2cc8ac30"],
"phoneNumber": {
"type": "TWILIO",
"id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30"
},
"webhookUrl": "https://example.com/webhook",
"webhookAuth": {},
"workflow": {
"nodes": [
{
"id": "2ZHj3IUpJFc-83H2-f8d3",
"type": "start",
"label": "Start",
"message": "Hello, how can I help you today?",
"messageType": "prompt",
"position": {
"x": 0,
"y": 0
},
"metadata": { "version": 1 },
"transitions": []
}
],
"edges": [],
"customVariables": [
{
"id": "z5QsyxUbrKPjYMGaMj1e1",
"name": "customer_name",
"dataType": "string",
"description": "",
"defaultValue": "john",
"extractionPrompt": "",
"enumValues": []
}
]
},
"outcomeResponseShape": {}
}
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: 'Customer Support Agent',
type: 'Single Prompt',
conversation: {
greetingMessage: 'Welcome! How may I assist you?',
greetingMessageType: 'TEXT',
preamble: 'You are a customer support assistant.',
pokeMessages: ['Are you still there?'],
params: {},
alignment: {greetingMessage: 'ltr', preamble: 'ltr'}
},
voice: {voiceId: 'en-US-Neural2-A', lang: 'en'},
llm: {
provider: 'openai',
model: 'gpt-4',
temperature: 0.7,
baseUrl: 'https://api.example.com',
apiKey: 'sk-...'
},
callSettings: {
noiseCancellation: 'telephony_optimized',
cancelNoisePer: 'conversation',
interrupt: true,
responseDelay: 400,
minInterruptionDuration: 0.5,
vadActivationThreshold: 0.5,
userInactivityTimeout: 15,
maxCallDuration: 300,
silenceThreshold: 800,
backgroundNoise: false,
enableAutoGainControl: false,
sendDenoisedToStt: false,
waitForUserToSpeakFirst: 0,
thinkingVoice: false,
speakerIdentification: false,
agenticRag: false,
languageDialectSwitcher: false,
genderDetection: false,
smartCallEnd: false
},
tools: [],
knowledgeBaseItemsIds: ['48f7656f-098b-4c43-b165-7cfd2cc8ac30'],
voiceDictionaryIds: ['48f7656f-098b-4c43-b165-7cfd2cc8ac30'],
phoneNumber: {type: 'TWILIO', id: '48f7656f-098b-4c43-b165-7cfd2cc8ac30'},
webhookUrl: 'https://example.com/webhook',
webhookAuth: {},
workflow: {
nodes: [
{
id: '2ZHj3IUpJFc-83H2-f8d3',
type: 'start',
label: 'Start',
message: 'Hello, how can I help you today?',
messageType: 'prompt',
position: {x: 0, y: 0},
metadata: {version: 1},
transitions: []
}
],
edges: [],
customVariables: [
{
id: 'z5QsyxUbrKPjYMGaMj1e1',
name: 'customer_name',
dataType: 'string',
description: '',
defaultValue: 'john',
extractionPrompt: '',
enumValues: []
}
]
},
outcomeResponseShape: {}
})
};
fetch('https://api.tryhamsa.com/v2/voice-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.tryhamsa.com/v2/voice-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' => 'Customer Support Agent',
'type' => 'Single Prompt',
'conversation' => [
'greetingMessage' => 'Welcome! How may I assist you?',
'greetingMessageType' => 'TEXT',
'preamble' => 'You are a customer support assistant.',
'pokeMessages' => [
'Are you still there?'
],
'params' => [
],
'alignment' => [
'greetingMessage' => 'ltr',
'preamble' => 'ltr'
]
],
'voice' => [
'voiceId' => 'en-US-Neural2-A',
'lang' => 'en'
],
'llm' => [
'provider' => 'openai',
'model' => 'gpt-4',
'temperature' => 0.7,
'baseUrl' => 'https://api.example.com',
'apiKey' => 'sk-...'
],
'callSettings' => [
'noiseCancellation' => 'telephony_optimized',
'cancelNoisePer' => 'conversation',
'interrupt' => true,
'responseDelay' => 400,
'minInterruptionDuration' => 0.5,
'vadActivationThreshold' => 0.5,
'userInactivityTimeout' => 15,
'maxCallDuration' => 300,
'silenceThreshold' => 800,
'backgroundNoise' => false,
'enableAutoGainControl' => false,
'sendDenoisedToStt' => false,
'waitForUserToSpeakFirst' => 0,
'thinkingVoice' => false,
'speakerIdentification' => false,
'agenticRag' => false,
'languageDialectSwitcher' => false,
'genderDetection' => false,
'smartCallEnd' => false
],
'tools' => [
],
'knowledgeBaseItemsIds' => [
'48f7656f-098b-4c43-b165-7cfd2cc8ac30'
],
'voiceDictionaryIds' => [
'48f7656f-098b-4c43-b165-7cfd2cc8ac30'
],
'phoneNumber' => [
'type' => 'TWILIO',
'id' => '48f7656f-098b-4c43-b165-7cfd2cc8ac30'
],
'webhookUrl' => 'https://example.com/webhook',
'webhookAuth' => [
],
'workflow' => [
'nodes' => [
[
'id' => '2ZHj3IUpJFc-83H2-f8d3',
'type' => 'start',
'label' => 'Start',
'message' => 'Hello, how can I help you today?',
'messageType' => 'prompt',
'position' => [
'x' => 0,
'y' => 0
],
'metadata' => [
'version' => 1
],
'transitions' => [
]
]
],
'edges' => [
],
'customVariables' => [
[
'id' => 'z5QsyxUbrKPjYMGaMj1e1',
'name' => 'customer_name',
'dataType' => 'string',
'description' => '',
'defaultValue' => 'john',
'extractionPrompt' => '',
'enumValues' => [
]
]
]
],
'outcomeResponseShape' => [
]
]),
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://api.tryhamsa.com/v2/voice-agents"
payload := strings.NewReader("{\n \"name\": \"Customer Support Agent\",\n \"type\": \"Single Prompt\",\n \"conversation\": {\n \"greetingMessage\": \"Welcome! How may I assist you?\",\n \"greetingMessageType\": \"TEXT\",\n \"preamble\": \"You are a customer support assistant.\",\n \"pokeMessages\": [\n \"Are you still there?\"\n ],\n \"params\": {},\n \"alignment\": {\n \"greetingMessage\": \"ltr\",\n \"preamble\": \"ltr\"\n }\n },\n \"voice\": {\n \"voiceId\": \"en-US-Neural2-A\",\n \"lang\": \"en\"\n },\n \"llm\": {\n \"provider\": \"openai\",\n \"model\": \"gpt-4\",\n \"temperature\": 0.7,\n \"baseUrl\": \"https://api.example.com\",\n \"apiKey\": \"sk-...\"\n },\n \"callSettings\": {\n \"noiseCancellation\": \"telephony_optimized\",\n \"cancelNoisePer\": \"conversation\",\n \"interrupt\": true,\n \"responseDelay\": 400,\n \"minInterruptionDuration\": 0.5,\n \"vadActivationThreshold\": 0.5,\n \"userInactivityTimeout\": 15,\n \"maxCallDuration\": 300,\n \"silenceThreshold\": 800,\n \"backgroundNoise\": false,\n \"enableAutoGainControl\": false,\n \"sendDenoisedToStt\": false,\n \"waitForUserToSpeakFirst\": 0,\n \"thinkingVoice\": false,\n \"speakerIdentification\": false,\n \"agenticRag\": false,\n \"languageDialectSwitcher\": false,\n \"genderDetection\": false,\n \"smartCallEnd\": false\n },\n \"tools\": [],\n \"knowledgeBaseItemsIds\": [\n \"48f7656f-098b-4c43-b165-7cfd2cc8ac30\"\n ],\n \"voiceDictionaryIds\": [\n \"48f7656f-098b-4c43-b165-7cfd2cc8ac30\"\n ],\n \"phoneNumber\": {\n \"type\": \"TWILIO\",\n \"id\": \"48f7656f-098b-4c43-b165-7cfd2cc8ac30\"\n },\n \"webhookUrl\": \"https://example.com/webhook\",\n \"webhookAuth\": {},\n \"workflow\": {\n \"nodes\": [\n {\n \"id\": \"2ZHj3IUpJFc-83H2-f8d3\",\n \"type\": \"start\",\n \"label\": \"Start\",\n \"message\": \"Hello, how can I help you today?\",\n \"messageType\": \"prompt\",\n \"position\": {\n \"x\": 0,\n \"y\": 0\n },\n \"metadata\": {\n \"version\": 1\n },\n \"transitions\": []\n }\n ],\n \"edges\": [],\n \"customVariables\": [\n {\n \"id\": \"z5QsyxUbrKPjYMGaMj1e1\",\n \"name\": \"customer_name\",\n \"dataType\": \"string\",\n \"description\": \"\",\n \"defaultValue\": \"john\",\n \"extractionPrompt\": \"\",\n \"enumValues\": []\n }\n ]\n },\n \"outcomeResponseShape\": {}\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://api.tryhamsa.com/v2/voice-agents")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Customer Support Agent\",\n \"type\": \"Single Prompt\",\n \"conversation\": {\n \"greetingMessage\": \"Welcome! How may I assist you?\",\n \"greetingMessageType\": \"TEXT\",\n \"preamble\": \"You are a customer support assistant.\",\n \"pokeMessages\": [\n \"Are you still there?\"\n ],\n \"params\": {},\n \"alignment\": {\n \"greetingMessage\": \"ltr\",\n \"preamble\": \"ltr\"\n }\n },\n \"voice\": {\n \"voiceId\": \"en-US-Neural2-A\",\n \"lang\": \"en\"\n },\n \"llm\": {\n \"provider\": \"openai\",\n \"model\": \"gpt-4\",\n \"temperature\": 0.7,\n \"baseUrl\": \"https://api.example.com\",\n \"apiKey\": \"sk-...\"\n },\n \"callSettings\": {\n \"noiseCancellation\": \"telephony_optimized\",\n \"cancelNoisePer\": \"conversation\",\n \"interrupt\": true,\n \"responseDelay\": 400,\n \"minInterruptionDuration\": 0.5,\n \"vadActivationThreshold\": 0.5,\n \"userInactivityTimeout\": 15,\n \"maxCallDuration\": 300,\n \"silenceThreshold\": 800,\n \"backgroundNoise\": false,\n \"enableAutoGainControl\": false,\n \"sendDenoisedToStt\": false,\n \"waitForUserToSpeakFirst\": 0,\n \"thinkingVoice\": false,\n \"speakerIdentification\": false,\n \"agenticRag\": false,\n \"languageDialectSwitcher\": false,\n \"genderDetection\": false,\n \"smartCallEnd\": false\n },\n \"tools\": [],\n \"knowledgeBaseItemsIds\": [\n \"48f7656f-098b-4c43-b165-7cfd2cc8ac30\"\n ],\n \"voiceDictionaryIds\": [\n \"48f7656f-098b-4c43-b165-7cfd2cc8ac30\"\n ],\n \"phoneNumber\": {\n \"type\": \"TWILIO\",\n \"id\": \"48f7656f-098b-4c43-b165-7cfd2cc8ac30\"\n },\n \"webhookUrl\": \"https://example.com/webhook\",\n \"webhookAuth\": {},\n \"workflow\": {\n \"nodes\": [\n {\n \"id\": \"2ZHj3IUpJFc-83H2-f8d3\",\n \"type\": \"start\",\n \"label\": \"Start\",\n \"message\": \"Hello, how can I help you today?\",\n \"messageType\": \"prompt\",\n \"position\": {\n \"x\": 0,\n \"y\": 0\n },\n \"metadata\": {\n \"version\": 1\n },\n \"transitions\": []\n }\n ],\n \"edges\": [],\n \"customVariables\": [\n {\n \"id\": \"z5QsyxUbrKPjYMGaMj1e1\",\n \"name\": \"customer_name\",\n \"dataType\": \"string\",\n \"description\": \"\",\n \"defaultValue\": \"john\",\n \"extractionPrompt\": \"\",\n \"enumValues\": []\n }\n ]\n },\n \"outcomeResponseShape\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryhamsa.com/v2/voice-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\": \"Customer Support Agent\",\n \"type\": \"Single Prompt\",\n \"conversation\": {\n \"greetingMessage\": \"Welcome! How may I assist you?\",\n \"greetingMessageType\": \"TEXT\",\n \"preamble\": \"You are a customer support assistant.\",\n \"pokeMessages\": [\n \"Are you still there?\"\n ],\n \"params\": {},\n \"alignment\": {\n \"greetingMessage\": \"ltr\",\n \"preamble\": \"ltr\"\n }\n },\n \"voice\": {\n \"voiceId\": \"en-US-Neural2-A\",\n \"lang\": \"en\"\n },\n \"llm\": {\n \"provider\": \"openai\",\n \"model\": \"gpt-4\",\n \"temperature\": 0.7,\n \"baseUrl\": \"https://api.example.com\",\n \"apiKey\": \"sk-...\"\n },\n \"callSettings\": {\n \"noiseCancellation\": \"telephony_optimized\",\n \"cancelNoisePer\": \"conversation\",\n \"interrupt\": true,\n \"responseDelay\": 400,\n \"minInterruptionDuration\": 0.5,\n \"vadActivationThreshold\": 0.5,\n \"userInactivityTimeout\": 15,\n \"maxCallDuration\": 300,\n \"silenceThreshold\": 800,\n \"backgroundNoise\": false,\n \"enableAutoGainControl\": false,\n \"sendDenoisedToStt\": false,\n \"waitForUserToSpeakFirst\": 0,\n \"thinkingVoice\": false,\n \"speakerIdentification\": false,\n \"agenticRag\": false,\n \"languageDialectSwitcher\": false,\n \"genderDetection\": false,\n \"smartCallEnd\": false\n },\n \"tools\": [],\n \"knowledgeBaseItemsIds\": [\n \"48f7656f-098b-4c43-b165-7cfd2cc8ac30\"\n ],\n \"voiceDictionaryIds\": [\n \"48f7656f-098b-4c43-b165-7cfd2cc8ac30\"\n ],\n \"phoneNumber\": {\n \"type\": \"TWILIO\",\n \"id\": \"48f7656f-098b-4c43-b165-7cfd2cc8ac30\"\n },\n \"webhookUrl\": \"https://example.com/webhook\",\n \"webhookAuth\": {},\n \"workflow\": {\n \"nodes\": [\n {\n \"id\": \"2ZHj3IUpJFc-83H2-f8d3\",\n \"type\": \"start\",\n \"label\": \"Start\",\n \"message\": \"Hello, how can I help you today?\",\n \"messageType\": \"prompt\",\n \"position\": {\n \"x\": 0,\n \"y\": 0\n },\n \"metadata\": {\n \"version\": 1\n },\n \"transitions\": []\n }\n ],\n \"edges\": [],\n \"customVariables\": [\n {\n \"id\": \"z5QsyxUbrKPjYMGaMj1e1\",\n \"name\": \"customer_name\",\n \"dataType\": \"string\",\n \"description\": \"\",\n \"defaultValue\": \"john\",\n \"extractionPrompt\": \"\",\n \"enumValues\": []\n }\n ]\n },\n \"outcomeResponseShape\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Voice agent created successfully",
"messageKey": "VoiceAgentCreatedSuccessfully",
"data": {
"id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
"type": "Single Prompt",
"name": "Customer Support Agent",
"conversation": {
"greetingMessage": "Hello, how can I help you today?",
"greetingMessageType": null,
"preamble": "You are a helpful assistant.",
"pokeMessages": [],
"params": {},
"alignment": {
"greetingMessage": "ltr",
"preamble": "ltr"
}
},
"voice": {
"voiceId": "en-US-Neural2-A",
"voiceRecordId": null,
"voiceRecord": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provider": "<string>",
"language": "<string>",
"image": "<string>",
"languageCode": "<string>",
"voiceRecord": {}
},
"lang": "en",
"ttsParams": {}
},
"llm": {
"provider": "openai",
"model": "gpt-4",
"temperature": 0.2,
"baseUrl": null,
"apiKey": null
},
"callSettings": {
"noiseCancellation": "telephony_optimized",
"cancelNoisePer": "conversation",
"interrupt": true,
"responseDelay": 400,
"userInactivityTimeout": 15,
"maxCallDuration": 300,
"silenceThreshold": 800,
"backgroundNoise": false,
"thinkingVoice": false,
"speakerIdentification": false,
"agenticRag": false,
"languageDialectSwitcher": false,
"minInterruptionDuration": 0.5,
"vadActivationThreshold": 0.5,
"enableAutoGainControl": false,
"sendDenoisedToStt": false,
"genderDetection": false,
"smartCallEnd": false,
"waitForUserToSpeakFirst": 0
},
"tools": [
{}
],
"knowledgeBaseItemsIds": [],
"voiceDictionaryIds": [],
"phoneNumber": {
"type": "TWILIO",
"id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30"
},
"webhookUrl": null,
"webhookAuth": {},
"workflow": {
"nodes": [
{
"id": "2ZHj3IUpJFc-83H2-f8d3",
"type": "start",
"label": "Start",
"message": "Hello, how can I help you today?",
"messageType": "prompt",
"position": {
"x": 0,
"y": 0
},
"metadata": {
"version": 1
},
"transitions": []
}
],
"edges": [],
"customVariables": [
{
"id": "z5QsyxUbrKPjYMGaMj1e1",
"name": "customer_name",
"dataType": "string",
"description": "",
"defaultValue": "john",
"extractionPrompt": "",
"enumValues": []
}
]
},
"outcomeResponseShape": {},
"resolvedWebTools": [
{}
],
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"account": {
"plan": "pro"
}
}
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}Create Voice Agent
Creates a new voice agent using the V2 API with enhanced configuration options.
curl --request POST \
--url https://api.tryhamsa.com/v2/voice-agents \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Customer Support Agent",
"type": "Single Prompt",
"conversation": {
"greetingMessage": "Welcome! How may I assist you?",
"greetingMessageType": "TEXT",
"preamble": "You are a customer support assistant.",
"pokeMessages": [
"Are you still there?"
],
"params": {},
"alignment": {
"greetingMessage": "ltr",
"preamble": "ltr"
}
},
"voice": {
"voiceId": "en-US-Neural2-A",
"lang": "en"
},
"llm": {
"provider": "openai",
"model": "gpt-4",
"temperature": 0.7,
"baseUrl": "https://api.example.com",
"apiKey": "sk-..."
},
"callSettings": {
"noiseCancellation": "telephony_optimized",
"cancelNoisePer": "conversation",
"interrupt": true,
"responseDelay": 400,
"minInterruptionDuration": 0.5,
"vadActivationThreshold": 0.5,
"userInactivityTimeout": 15,
"maxCallDuration": 300,
"silenceThreshold": 800,
"backgroundNoise": false,
"enableAutoGainControl": false,
"sendDenoisedToStt": false,
"waitForUserToSpeakFirst": 0,
"thinkingVoice": false,
"speakerIdentification": false,
"agenticRag": false,
"languageDialectSwitcher": false,
"genderDetection": false,
"smartCallEnd": false
},
"tools": [],
"knowledgeBaseItemsIds": [
"48f7656f-098b-4c43-b165-7cfd2cc8ac30"
],
"voiceDictionaryIds": [
"48f7656f-098b-4c43-b165-7cfd2cc8ac30"
],
"phoneNumber": {
"type": "TWILIO",
"id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30"
},
"webhookUrl": "https://example.com/webhook",
"webhookAuth": {},
"workflow": {
"nodes": [
{
"id": "2ZHj3IUpJFc-83H2-f8d3",
"type": "start",
"label": "Start",
"message": "Hello, how can I help you today?",
"messageType": "prompt",
"position": {
"x": 0,
"y": 0
},
"metadata": {
"version": 1
},
"transitions": []
}
],
"edges": [],
"customVariables": [
{
"id": "z5QsyxUbrKPjYMGaMj1e1",
"name": "customer_name",
"dataType": "string",
"description": "",
"defaultValue": "john",
"extractionPrompt": "",
"enumValues": []
}
]
},
"outcomeResponseShape": {}
}
'import requests
url = "https://api.tryhamsa.com/v2/voice-agents"
payload = {
"name": "Customer Support Agent",
"type": "Single Prompt",
"conversation": {
"greetingMessage": "Welcome! How may I assist you?",
"greetingMessageType": "TEXT",
"preamble": "You are a customer support assistant.",
"pokeMessages": ["Are you still there?"],
"params": {},
"alignment": {
"greetingMessage": "ltr",
"preamble": "ltr"
}
},
"voice": {
"voiceId": "en-US-Neural2-A",
"lang": "en"
},
"llm": {
"provider": "openai",
"model": "gpt-4",
"temperature": 0.7,
"baseUrl": "https://api.example.com",
"apiKey": "sk-..."
},
"callSettings": {
"noiseCancellation": "telephony_optimized",
"cancelNoisePer": "conversation",
"interrupt": True,
"responseDelay": 400,
"minInterruptionDuration": 0.5,
"vadActivationThreshold": 0.5,
"userInactivityTimeout": 15,
"maxCallDuration": 300,
"silenceThreshold": 800,
"backgroundNoise": False,
"enableAutoGainControl": False,
"sendDenoisedToStt": False,
"waitForUserToSpeakFirst": 0,
"thinkingVoice": False,
"speakerIdentification": False,
"agenticRag": False,
"languageDialectSwitcher": False,
"genderDetection": False,
"smartCallEnd": False
},
"tools": [],
"knowledgeBaseItemsIds": ["48f7656f-098b-4c43-b165-7cfd2cc8ac30"],
"voiceDictionaryIds": ["48f7656f-098b-4c43-b165-7cfd2cc8ac30"],
"phoneNumber": {
"type": "TWILIO",
"id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30"
},
"webhookUrl": "https://example.com/webhook",
"webhookAuth": {},
"workflow": {
"nodes": [
{
"id": "2ZHj3IUpJFc-83H2-f8d3",
"type": "start",
"label": "Start",
"message": "Hello, how can I help you today?",
"messageType": "prompt",
"position": {
"x": 0,
"y": 0
},
"metadata": { "version": 1 },
"transitions": []
}
],
"edges": [],
"customVariables": [
{
"id": "z5QsyxUbrKPjYMGaMj1e1",
"name": "customer_name",
"dataType": "string",
"description": "",
"defaultValue": "john",
"extractionPrompt": "",
"enumValues": []
}
]
},
"outcomeResponseShape": {}
}
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: 'Customer Support Agent',
type: 'Single Prompt',
conversation: {
greetingMessage: 'Welcome! How may I assist you?',
greetingMessageType: 'TEXT',
preamble: 'You are a customer support assistant.',
pokeMessages: ['Are you still there?'],
params: {},
alignment: {greetingMessage: 'ltr', preamble: 'ltr'}
},
voice: {voiceId: 'en-US-Neural2-A', lang: 'en'},
llm: {
provider: 'openai',
model: 'gpt-4',
temperature: 0.7,
baseUrl: 'https://api.example.com',
apiKey: 'sk-...'
},
callSettings: {
noiseCancellation: 'telephony_optimized',
cancelNoisePer: 'conversation',
interrupt: true,
responseDelay: 400,
minInterruptionDuration: 0.5,
vadActivationThreshold: 0.5,
userInactivityTimeout: 15,
maxCallDuration: 300,
silenceThreshold: 800,
backgroundNoise: false,
enableAutoGainControl: false,
sendDenoisedToStt: false,
waitForUserToSpeakFirst: 0,
thinkingVoice: false,
speakerIdentification: false,
agenticRag: false,
languageDialectSwitcher: false,
genderDetection: false,
smartCallEnd: false
},
tools: [],
knowledgeBaseItemsIds: ['48f7656f-098b-4c43-b165-7cfd2cc8ac30'],
voiceDictionaryIds: ['48f7656f-098b-4c43-b165-7cfd2cc8ac30'],
phoneNumber: {type: 'TWILIO', id: '48f7656f-098b-4c43-b165-7cfd2cc8ac30'},
webhookUrl: 'https://example.com/webhook',
webhookAuth: {},
workflow: {
nodes: [
{
id: '2ZHj3IUpJFc-83H2-f8d3',
type: 'start',
label: 'Start',
message: 'Hello, how can I help you today?',
messageType: 'prompt',
position: {x: 0, y: 0},
metadata: {version: 1},
transitions: []
}
],
edges: [],
customVariables: [
{
id: 'z5QsyxUbrKPjYMGaMj1e1',
name: 'customer_name',
dataType: 'string',
description: '',
defaultValue: 'john',
extractionPrompt: '',
enumValues: []
}
]
},
outcomeResponseShape: {}
})
};
fetch('https://api.tryhamsa.com/v2/voice-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.tryhamsa.com/v2/voice-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' => 'Customer Support Agent',
'type' => 'Single Prompt',
'conversation' => [
'greetingMessage' => 'Welcome! How may I assist you?',
'greetingMessageType' => 'TEXT',
'preamble' => 'You are a customer support assistant.',
'pokeMessages' => [
'Are you still there?'
],
'params' => [
],
'alignment' => [
'greetingMessage' => 'ltr',
'preamble' => 'ltr'
]
],
'voice' => [
'voiceId' => 'en-US-Neural2-A',
'lang' => 'en'
],
'llm' => [
'provider' => 'openai',
'model' => 'gpt-4',
'temperature' => 0.7,
'baseUrl' => 'https://api.example.com',
'apiKey' => 'sk-...'
],
'callSettings' => [
'noiseCancellation' => 'telephony_optimized',
'cancelNoisePer' => 'conversation',
'interrupt' => true,
'responseDelay' => 400,
'minInterruptionDuration' => 0.5,
'vadActivationThreshold' => 0.5,
'userInactivityTimeout' => 15,
'maxCallDuration' => 300,
'silenceThreshold' => 800,
'backgroundNoise' => false,
'enableAutoGainControl' => false,
'sendDenoisedToStt' => false,
'waitForUserToSpeakFirst' => 0,
'thinkingVoice' => false,
'speakerIdentification' => false,
'agenticRag' => false,
'languageDialectSwitcher' => false,
'genderDetection' => false,
'smartCallEnd' => false
],
'tools' => [
],
'knowledgeBaseItemsIds' => [
'48f7656f-098b-4c43-b165-7cfd2cc8ac30'
],
'voiceDictionaryIds' => [
'48f7656f-098b-4c43-b165-7cfd2cc8ac30'
],
'phoneNumber' => [
'type' => 'TWILIO',
'id' => '48f7656f-098b-4c43-b165-7cfd2cc8ac30'
],
'webhookUrl' => 'https://example.com/webhook',
'webhookAuth' => [
],
'workflow' => [
'nodes' => [
[
'id' => '2ZHj3IUpJFc-83H2-f8d3',
'type' => 'start',
'label' => 'Start',
'message' => 'Hello, how can I help you today?',
'messageType' => 'prompt',
'position' => [
'x' => 0,
'y' => 0
],
'metadata' => [
'version' => 1
],
'transitions' => [
]
]
],
'edges' => [
],
'customVariables' => [
[
'id' => 'z5QsyxUbrKPjYMGaMj1e1',
'name' => 'customer_name',
'dataType' => 'string',
'description' => '',
'defaultValue' => 'john',
'extractionPrompt' => '',
'enumValues' => [
]
]
]
],
'outcomeResponseShape' => [
]
]),
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://api.tryhamsa.com/v2/voice-agents"
payload := strings.NewReader("{\n \"name\": \"Customer Support Agent\",\n \"type\": \"Single Prompt\",\n \"conversation\": {\n \"greetingMessage\": \"Welcome! How may I assist you?\",\n \"greetingMessageType\": \"TEXT\",\n \"preamble\": \"You are a customer support assistant.\",\n \"pokeMessages\": [\n \"Are you still there?\"\n ],\n \"params\": {},\n \"alignment\": {\n \"greetingMessage\": \"ltr\",\n \"preamble\": \"ltr\"\n }\n },\n \"voice\": {\n \"voiceId\": \"en-US-Neural2-A\",\n \"lang\": \"en\"\n },\n \"llm\": {\n \"provider\": \"openai\",\n \"model\": \"gpt-4\",\n \"temperature\": 0.7,\n \"baseUrl\": \"https://api.example.com\",\n \"apiKey\": \"sk-...\"\n },\n \"callSettings\": {\n \"noiseCancellation\": \"telephony_optimized\",\n \"cancelNoisePer\": \"conversation\",\n \"interrupt\": true,\n \"responseDelay\": 400,\n \"minInterruptionDuration\": 0.5,\n \"vadActivationThreshold\": 0.5,\n \"userInactivityTimeout\": 15,\n \"maxCallDuration\": 300,\n \"silenceThreshold\": 800,\n \"backgroundNoise\": false,\n \"enableAutoGainControl\": false,\n \"sendDenoisedToStt\": false,\n \"waitForUserToSpeakFirst\": 0,\n \"thinkingVoice\": false,\n \"speakerIdentification\": false,\n \"agenticRag\": false,\n \"languageDialectSwitcher\": false,\n \"genderDetection\": false,\n \"smartCallEnd\": false\n },\n \"tools\": [],\n \"knowledgeBaseItemsIds\": [\n \"48f7656f-098b-4c43-b165-7cfd2cc8ac30\"\n ],\n \"voiceDictionaryIds\": [\n \"48f7656f-098b-4c43-b165-7cfd2cc8ac30\"\n ],\n \"phoneNumber\": {\n \"type\": \"TWILIO\",\n \"id\": \"48f7656f-098b-4c43-b165-7cfd2cc8ac30\"\n },\n \"webhookUrl\": \"https://example.com/webhook\",\n \"webhookAuth\": {},\n \"workflow\": {\n \"nodes\": [\n {\n \"id\": \"2ZHj3IUpJFc-83H2-f8d3\",\n \"type\": \"start\",\n \"label\": \"Start\",\n \"message\": \"Hello, how can I help you today?\",\n \"messageType\": \"prompt\",\n \"position\": {\n \"x\": 0,\n \"y\": 0\n },\n \"metadata\": {\n \"version\": 1\n },\n \"transitions\": []\n }\n ],\n \"edges\": [],\n \"customVariables\": [\n {\n \"id\": \"z5QsyxUbrKPjYMGaMj1e1\",\n \"name\": \"customer_name\",\n \"dataType\": \"string\",\n \"description\": \"\",\n \"defaultValue\": \"john\",\n \"extractionPrompt\": \"\",\n \"enumValues\": []\n }\n ]\n },\n \"outcomeResponseShape\": {}\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://api.tryhamsa.com/v2/voice-agents")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Customer Support Agent\",\n \"type\": \"Single Prompt\",\n \"conversation\": {\n \"greetingMessage\": \"Welcome! How may I assist you?\",\n \"greetingMessageType\": \"TEXT\",\n \"preamble\": \"You are a customer support assistant.\",\n \"pokeMessages\": [\n \"Are you still there?\"\n ],\n \"params\": {},\n \"alignment\": {\n \"greetingMessage\": \"ltr\",\n \"preamble\": \"ltr\"\n }\n },\n \"voice\": {\n \"voiceId\": \"en-US-Neural2-A\",\n \"lang\": \"en\"\n },\n \"llm\": {\n \"provider\": \"openai\",\n \"model\": \"gpt-4\",\n \"temperature\": 0.7,\n \"baseUrl\": \"https://api.example.com\",\n \"apiKey\": \"sk-...\"\n },\n \"callSettings\": {\n \"noiseCancellation\": \"telephony_optimized\",\n \"cancelNoisePer\": \"conversation\",\n \"interrupt\": true,\n \"responseDelay\": 400,\n \"minInterruptionDuration\": 0.5,\n \"vadActivationThreshold\": 0.5,\n \"userInactivityTimeout\": 15,\n \"maxCallDuration\": 300,\n \"silenceThreshold\": 800,\n \"backgroundNoise\": false,\n \"enableAutoGainControl\": false,\n \"sendDenoisedToStt\": false,\n \"waitForUserToSpeakFirst\": 0,\n \"thinkingVoice\": false,\n \"speakerIdentification\": false,\n \"agenticRag\": false,\n \"languageDialectSwitcher\": false,\n \"genderDetection\": false,\n \"smartCallEnd\": false\n },\n \"tools\": [],\n \"knowledgeBaseItemsIds\": [\n \"48f7656f-098b-4c43-b165-7cfd2cc8ac30\"\n ],\n \"voiceDictionaryIds\": [\n \"48f7656f-098b-4c43-b165-7cfd2cc8ac30\"\n ],\n \"phoneNumber\": {\n \"type\": \"TWILIO\",\n \"id\": \"48f7656f-098b-4c43-b165-7cfd2cc8ac30\"\n },\n \"webhookUrl\": \"https://example.com/webhook\",\n \"webhookAuth\": {},\n \"workflow\": {\n \"nodes\": [\n {\n \"id\": \"2ZHj3IUpJFc-83H2-f8d3\",\n \"type\": \"start\",\n \"label\": \"Start\",\n \"message\": \"Hello, how can I help you today?\",\n \"messageType\": \"prompt\",\n \"position\": {\n \"x\": 0,\n \"y\": 0\n },\n \"metadata\": {\n \"version\": 1\n },\n \"transitions\": []\n }\n ],\n \"edges\": [],\n \"customVariables\": [\n {\n \"id\": \"z5QsyxUbrKPjYMGaMj1e1\",\n \"name\": \"customer_name\",\n \"dataType\": \"string\",\n \"description\": \"\",\n \"defaultValue\": \"john\",\n \"extractionPrompt\": \"\",\n \"enumValues\": []\n }\n ]\n },\n \"outcomeResponseShape\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryhamsa.com/v2/voice-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\": \"Customer Support Agent\",\n \"type\": \"Single Prompt\",\n \"conversation\": {\n \"greetingMessage\": \"Welcome! How may I assist you?\",\n \"greetingMessageType\": \"TEXT\",\n \"preamble\": \"You are a customer support assistant.\",\n \"pokeMessages\": [\n \"Are you still there?\"\n ],\n \"params\": {},\n \"alignment\": {\n \"greetingMessage\": \"ltr\",\n \"preamble\": \"ltr\"\n }\n },\n \"voice\": {\n \"voiceId\": \"en-US-Neural2-A\",\n \"lang\": \"en\"\n },\n \"llm\": {\n \"provider\": \"openai\",\n \"model\": \"gpt-4\",\n \"temperature\": 0.7,\n \"baseUrl\": \"https://api.example.com\",\n \"apiKey\": \"sk-...\"\n },\n \"callSettings\": {\n \"noiseCancellation\": \"telephony_optimized\",\n \"cancelNoisePer\": \"conversation\",\n \"interrupt\": true,\n \"responseDelay\": 400,\n \"minInterruptionDuration\": 0.5,\n \"vadActivationThreshold\": 0.5,\n \"userInactivityTimeout\": 15,\n \"maxCallDuration\": 300,\n \"silenceThreshold\": 800,\n \"backgroundNoise\": false,\n \"enableAutoGainControl\": false,\n \"sendDenoisedToStt\": false,\n \"waitForUserToSpeakFirst\": 0,\n \"thinkingVoice\": false,\n \"speakerIdentification\": false,\n \"agenticRag\": false,\n \"languageDialectSwitcher\": false,\n \"genderDetection\": false,\n \"smartCallEnd\": false\n },\n \"tools\": [],\n \"knowledgeBaseItemsIds\": [\n \"48f7656f-098b-4c43-b165-7cfd2cc8ac30\"\n ],\n \"voiceDictionaryIds\": [\n \"48f7656f-098b-4c43-b165-7cfd2cc8ac30\"\n ],\n \"phoneNumber\": {\n \"type\": \"TWILIO\",\n \"id\": \"48f7656f-098b-4c43-b165-7cfd2cc8ac30\"\n },\n \"webhookUrl\": \"https://example.com/webhook\",\n \"webhookAuth\": {},\n \"workflow\": {\n \"nodes\": [\n {\n \"id\": \"2ZHj3IUpJFc-83H2-f8d3\",\n \"type\": \"start\",\n \"label\": \"Start\",\n \"message\": \"Hello, how can I help you today?\",\n \"messageType\": \"prompt\",\n \"position\": {\n \"x\": 0,\n \"y\": 0\n },\n \"metadata\": {\n \"version\": 1\n },\n \"transitions\": []\n }\n ],\n \"edges\": [],\n \"customVariables\": [\n {\n \"id\": \"z5QsyxUbrKPjYMGaMj1e1\",\n \"name\": \"customer_name\",\n \"dataType\": \"string\",\n \"description\": \"\",\n \"defaultValue\": \"john\",\n \"extractionPrompt\": \"\",\n \"enumValues\": []\n }\n ]\n },\n \"outcomeResponseShape\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Voice agent created successfully",
"messageKey": "VoiceAgentCreatedSuccessfully",
"data": {
"id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
"type": "Single Prompt",
"name": "Customer Support Agent",
"conversation": {
"greetingMessage": "Hello, how can I help you today?",
"greetingMessageType": null,
"preamble": "You are a helpful assistant.",
"pokeMessages": [],
"params": {},
"alignment": {
"greetingMessage": "ltr",
"preamble": "ltr"
}
},
"voice": {
"voiceId": "en-US-Neural2-A",
"voiceRecordId": null,
"voiceRecord": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provider": "<string>",
"language": "<string>",
"image": "<string>",
"languageCode": "<string>",
"voiceRecord": {}
},
"lang": "en",
"ttsParams": {}
},
"llm": {
"provider": "openai",
"model": "gpt-4",
"temperature": 0.2,
"baseUrl": null,
"apiKey": null
},
"callSettings": {
"noiseCancellation": "telephony_optimized",
"cancelNoisePer": "conversation",
"interrupt": true,
"responseDelay": 400,
"userInactivityTimeout": 15,
"maxCallDuration": 300,
"silenceThreshold": 800,
"backgroundNoise": false,
"thinkingVoice": false,
"speakerIdentification": false,
"agenticRag": false,
"languageDialectSwitcher": false,
"minInterruptionDuration": 0.5,
"vadActivationThreshold": 0.5,
"enableAutoGainControl": false,
"sendDenoisedToStt": false,
"genderDetection": false,
"smartCallEnd": false,
"waitForUserToSpeakFirst": 0
},
"tools": [
{}
],
"knowledgeBaseItemsIds": [],
"voiceDictionaryIds": [],
"phoneNumber": {
"type": "TWILIO",
"id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30"
},
"webhookUrl": null,
"webhookAuth": {},
"workflow": {
"nodes": [
{
"id": "2ZHj3IUpJFc-83H2-f8d3",
"type": "start",
"label": "Start",
"message": "Hello, how can I help you today?",
"messageType": "prompt",
"position": {
"x": 0,
"y": 0
},
"metadata": {
"version": 1
},
"transitions": []
}
],
"edges": [],
"customVariables": [
{
"id": "z5QsyxUbrKPjYMGaMj1e1",
"name": "customer_name",
"dataType": "string",
"description": "",
"defaultValue": "john",
"extractionPrompt": "",
"enumValues": []
}
]
},
"outcomeResponseShape": {},
"resolvedWebTools": [
{}
],
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"account": {
"plan": "pro"
}
}
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}Authorizations
Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '
Body
Name of the voice agent (max 150 characters).
150"Customer Support Agent"
Type of voice agent.
Single Prompt, Flow Agent "Single Prompt"
Conversation settings for the voice agent.
Show child attributes
Show child attributes
Voice settings for the agent.
Show child attributes
Show child attributes
LLM configuration.
Show child attributes
Show child attributes
Call and audio settings.
Show child attributes
Show child attributes
Web tools attached to the agent.
Show child attributes
Show child attributes
Array of knowledge base item UUIDs.
["48f7656f-098b-4c43-b165-7cfd2cc8ac30"]
Array of voice dictionary UUIDs.
["48f7656f-098b-4c43-b165-7cfd2cc8ac30"]
Phone number configuration.
Show child attributes
Show child attributes
Webhook URL for external integrations.
"https://example.com/webhook"
Webhook authentication configuration.
Workflow graph for Flow Agents (type = "Flow Agent"). Ignored for Single Prompt agents.
Show child attributes
Show child attributes
{ "nodes": [ { "id": "2ZHj3IUpJFc-83H2-f8d3", "type": "start", "label": "Start", "message": "Hello, how can I help you today?", "messageType": "prompt", "position": { "x": 0, "y": 0 }, "metadata": { "version": 1 }, "transitions": [] } ], "edges": [], "customVariables": [ { "id": "z5QsyxUbrKPjYMGaMj1e1", "name": "customer_name", "dataType": "string", "description": "", "defaultValue": "john", "extractionPrompt": "", "enumValues": [] } ] }
Expected outcome response structure.
Was this page helpful?