Create voice agent
curl --request POST \
--url https://www.tryunleashx.com/api/v1/global/create-agent \
--header 'Content-Type: application/json' \
--header 'token: <token>' \
--data '
{
"agent_id": 123,
"agent_name": "<string>",
"description": "<string>",
"prompt": "<string>",
"timezone": "<string>",
"greeting": "<string>",
"session_data_webhook": "<string>",
"voice": {
"voice_id": "<string>",
"model": "<string>",
"settings": {}
},
"speech_to_text": {
"provider": "<string>",
"model": "<string>"
},
"llm": {
"llm": "<string>",
"model": "<string>"
},
"configurations": {}
}
'import requests
url = "https://www.tryunleashx.com/api/v1/global/create-agent"
payload = {
"agent_id": 123,
"agent_name": "<string>",
"description": "<string>",
"prompt": "<string>",
"timezone": "<string>",
"greeting": "<string>",
"session_data_webhook": "<string>",
"voice": {
"voice_id": "<string>",
"model": "<string>",
"settings": {}
},
"speech_to_text": {
"provider": "<string>",
"model": "<string>"
},
"llm": {
"llm": "<string>",
"model": "<string>"
},
"configurations": {}
}
headers = {
"token": "<token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: 123,
agent_name: '<string>',
description: '<string>',
prompt: '<string>',
timezone: '<string>',
greeting: '<string>',
session_data_webhook: '<string>',
voice: {voice_id: '<string>', model: '<string>', settings: {}},
speech_to_text: {provider: '<string>', model: '<string>'},
llm: {llm: '<string>', model: '<string>'},
configurations: {}
})
};
fetch('https://www.tryunleashx.com/api/v1/global/create-agent', 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://www.tryunleashx.com/api/v1/global/create-agent",
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([
'agent_id' => 123,
'agent_name' => '<string>',
'description' => '<string>',
'prompt' => '<string>',
'timezone' => '<string>',
'greeting' => '<string>',
'session_data_webhook' => '<string>',
'voice' => [
'voice_id' => '<string>',
'model' => '<string>',
'settings' => [
]
],
'speech_to_text' => [
'provider' => '<string>',
'model' => '<string>'
],
'llm' => [
'llm' => '<string>',
'model' => '<string>'
],
'configurations' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <token>"
],
]);
$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://www.tryunleashx.com/api/v1/global/create-agent"
payload := strings.NewReader("{\n \"agent_id\": 123,\n \"agent_name\": \"<string>\",\n \"description\": \"<string>\",\n \"prompt\": \"<string>\",\n \"timezone\": \"<string>\",\n \"greeting\": \"<string>\",\n \"session_data_webhook\": \"<string>\",\n \"voice\": {\n \"voice_id\": \"<string>\",\n \"model\": \"<string>\",\n \"settings\": {}\n },\n \"speech_to_text\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\"\n },\n \"llm\": {\n \"llm\": \"<string>\",\n \"model\": \"<string>\"\n },\n \"configurations\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<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://www.tryunleashx.com/api/v1/global/create-agent")
.header("token", "<token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": 123,\n \"agent_name\": \"<string>\",\n \"description\": \"<string>\",\n \"prompt\": \"<string>\",\n \"timezone\": \"<string>\",\n \"greeting\": \"<string>\",\n \"session_data_webhook\": \"<string>\",\n \"voice\": {\n \"voice_id\": \"<string>\",\n \"model\": \"<string>\",\n \"settings\": {}\n },\n \"speech_to_text\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\"\n },\n \"llm\": {\n \"llm\": \"<string>\",\n \"model\": \"<string>\"\n },\n \"configurations\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.tryunleashx.com/api/v1/global/create-agent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": 123,\n \"agent_name\": \"<string>\",\n \"description\": \"<string>\",\n \"prompt\": \"<string>\",\n \"timezone\": \"<string>\",\n \"greeting\": \"<string>\",\n \"session_data_webhook\": \"<string>\",\n \"voice\": {\n \"voice_id\": \"<string>\",\n \"model\": \"<string>\",\n \"settings\": {}\n },\n \"speech_to_text\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\"\n },\n \"llm\": {\n \"llm\": \"<string>\",\n \"model\": \"<string>\"\n },\n \"configurations\": {}\n}"
response = http.request(request)
puts response.read_bodyVoice AI
Update Voice Agent
POST
/
create-agent
Create voice agent
curl --request POST \
--url https://www.tryunleashx.com/api/v1/global/create-agent \
--header 'Content-Type: application/json' \
--header 'token: <token>' \
--data '
{
"agent_id": 123,
"agent_name": "<string>",
"description": "<string>",
"prompt": "<string>",
"timezone": "<string>",
"greeting": "<string>",
"session_data_webhook": "<string>",
"voice": {
"voice_id": "<string>",
"model": "<string>",
"settings": {}
},
"speech_to_text": {
"provider": "<string>",
"model": "<string>"
},
"llm": {
"llm": "<string>",
"model": "<string>"
},
"configurations": {}
}
'import requests
url = "https://www.tryunleashx.com/api/v1/global/create-agent"
payload = {
"agent_id": 123,
"agent_name": "<string>",
"description": "<string>",
"prompt": "<string>",
"timezone": "<string>",
"greeting": "<string>",
"session_data_webhook": "<string>",
"voice": {
"voice_id": "<string>",
"model": "<string>",
"settings": {}
},
"speech_to_text": {
"provider": "<string>",
"model": "<string>"
},
"llm": {
"llm": "<string>",
"model": "<string>"
},
"configurations": {}
}
headers = {
"token": "<token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: 123,
agent_name: '<string>',
description: '<string>',
prompt: '<string>',
timezone: '<string>',
greeting: '<string>',
session_data_webhook: '<string>',
voice: {voice_id: '<string>', model: '<string>', settings: {}},
speech_to_text: {provider: '<string>', model: '<string>'},
llm: {llm: '<string>', model: '<string>'},
configurations: {}
})
};
fetch('https://www.tryunleashx.com/api/v1/global/create-agent', 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://www.tryunleashx.com/api/v1/global/create-agent",
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([
'agent_id' => 123,
'agent_name' => '<string>',
'description' => '<string>',
'prompt' => '<string>',
'timezone' => '<string>',
'greeting' => '<string>',
'session_data_webhook' => '<string>',
'voice' => [
'voice_id' => '<string>',
'model' => '<string>',
'settings' => [
]
],
'speech_to_text' => [
'provider' => '<string>',
'model' => '<string>'
],
'llm' => [
'llm' => '<string>',
'model' => '<string>'
],
'configurations' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <token>"
],
]);
$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://www.tryunleashx.com/api/v1/global/create-agent"
payload := strings.NewReader("{\n \"agent_id\": 123,\n \"agent_name\": \"<string>\",\n \"description\": \"<string>\",\n \"prompt\": \"<string>\",\n \"timezone\": \"<string>\",\n \"greeting\": \"<string>\",\n \"session_data_webhook\": \"<string>\",\n \"voice\": {\n \"voice_id\": \"<string>\",\n \"model\": \"<string>\",\n \"settings\": {}\n },\n \"speech_to_text\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\"\n },\n \"llm\": {\n \"llm\": \"<string>\",\n \"model\": \"<string>\"\n },\n \"configurations\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<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://www.tryunleashx.com/api/v1/global/create-agent")
.header("token", "<token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": 123,\n \"agent_name\": \"<string>\",\n \"description\": \"<string>\",\n \"prompt\": \"<string>\",\n \"timezone\": \"<string>\",\n \"greeting\": \"<string>\",\n \"session_data_webhook\": \"<string>\",\n \"voice\": {\n \"voice_id\": \"<string>\",\n \"model\": \"<string>\",\n \"settings\": {}\n },\n \"speech_to_text\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\"\n },\n \"llm\": {\n \"llm\": \"<string>\",\n \"model\": \"<string>\"\n },\n \"configurations\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.tryunleashx.com/api/v1/global/create-agent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": 123,\n \"agent_name\": \"<string>\",\n \"description\": \"<string>\",\n \"prompt\": \"<string>\",\n \"timezone\": \"<string>\",\n \"greeting\": \"<string>\",\n \"session_data_webhook\": \"<string>\",\n \"voice\": {\n \"voice_id\": \"<string>\",\n \"model\": \"<string>\",\n \"settings\": {}\n },\n \"speech_to_text\": {\n \"provider\": \"<string>\",\n \"model\": \"<string>\"\n },\n \"llm\": {\n \"llm\": \"<string>\",\n \"model\": \"<string>\"\n },\n \"configurations\": {}\n}"
response = http.request(request)
puts response.read_bodyThe Update Voice Agent API uses the same request/response shape as Create Voice Agent, but you must include
agent_id to identify which agent to update. Only agent_id is required — include any other fields you want to change.
API Endpoint
POST/api/v1/global/create-agent
Content-Type: application/json
Authentication: Required (Token header: token)
Request Body
{
"agent_id": 123,
"agent_name": "Updated Support Agent",
"description": "Updated description",
"prompt": "Updated prompt/instructions",
"timezone": "Asia/Kolkata",
"greeting": "Hello and welcome",
"session_data_webhook": "https://www.tryunleashx.com/webhooks/session-data",
"voice": {
"provider": "elevenlabs",
"voice_id": "RXe6OFmxoC0nlSWpuCDy",
"model": "eleven_turbo_v2_5",
"settings": {
"stability": 0.5,
"voice_style": 1,
"speed": 1.0
}
},
"speech_to_text": {
"provider": "deepgram",
"model": "nova-2",
"language": "english"
},
"llm": {
"llm": "gpt-4o",
"model": "gpt-4o"
},
"configurations": {
"confidence_threshold": 0.8,
"do_not_call_detection": true
}
}
Required Fields
| Field | Type | Description |
|---|---|---|
agent_id | integer | ID of the agent to update (required) |
Optional Fields
All other fields follow the same definitions as the Create Voice Agent API — include only the fields you want to update.Response
Success Response
Status Code:200 OK
{
"success": true,
"message": "Voice agent updated successfully",
"data": {
"agent_id": 123,
"agent_name": "Updated Support Agent"
}
}
Error Responses
400 Bad Request
{
"error": true,
"message": "Agent ID is required"
}
401 Unauthorized
{
"error": true,
"message": "Invalid Auth Key or Session Expired"
}
404 Not Found
{
"error": true,
"message": "Agent not found"
}
422 Unprocessable Entity
{
"error": true,
"message": "Validation error message"
}
Example Requests
# Update agent using agent_id in request body
curl -X POST https://www.tryunleashx.com/api/v1/global/create-agent \
-H "Content-Type: application/json" \
-H "token: your_api_token_here" \
-d '{
"agent_id": 123,
"agent_name": "Updated Support Agent",
"prompt": "You are an updated helpful support agent.",
"voice": {
"provider": "elevenlabs",
"voice_id": "RXe6OFmxoC0nlSWpuCDy"
}
}'
# Or using agent_id as query parameter
curl -X POST "https://www.tryunleashx.com/api/v1/global/create-agent?agent_id=123" \
-H "Content-Type: application/json" \
-H "token: your_api_token_here" \
-d '{
"agent_name": "Updated Support Agent",
"prompt": "You are an updated helpful support agent."
}'
Notes
- Only include fields you want to update; omitted fields will remain unchanged.
- The agent must exist and belong to your workspace.
- For available options for
voice.provider,speech_to_text.provider,speech_to_text.language,llmmodels, andtts_model, refer to the Create Voice Agent API documentation. - The
agent_idcan be provided either in the request body or as a query parameter.
Headers
API token for authentication
Body
application/json
Response
201
Created
Was this page helpful?
⌘I

