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": {
"provider": "elevenlabs",
"voice_id": "<string>",
"model": "<string>",
"settings": {}
},
"speech_to_text": {
"provider": "<string>",
"model": "<string>",
"language": "english"
},
"llm": {
"llm": "<string>",
"model": "<string>"
},
"configurations": {}
}
'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": {
"provider": "elevenlabs",
"voice_id": "<string>",
"model": "<string>",
"settings": {}
},
"speech_to_text": {
"provider": "<string>",
"model": "<string>",
"language": "english"
},
"llm": {
"llm": "<string>",
"model": "<string>"
},
"configurations": {}
}
'agent_id to identify which agent to update. Only agent_id is required — include any other fields you want to change.
/api/v1/global/create-agent
Content-Type: application/json
Authentication: Required (Token header: token)
{
"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
}
}
| Field | Type | Description |
|---|---|---|
agent_id | integer | ID of the agent to update (required) |
200 OK
{
"success": true,
"message": "Voice agent updated successfully",
"data": {
"agent_id": 123,
"agent_name": "Updated Support Agent"
}
}
{
"error": true,
"message": "Agent ID is required"
}
{
"error": true,
"message": "Invalid Auth Key or Session Expired"
}
{
"error": true,
"message": "Agent not found"
}
{
"error": true,
"message": "Validation error message"
}
# 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."
}'
voice.provider, speech_to_text.provider, speech_to_text.language, llm models, and tts_model, refer to the Create Voice Agent API documentation.agent_id can be provided either in the request body or as a query parameter.API token for authentication
Created
Was this page helpful?