Skip to main content
POST
/
api
/
agents
/
create
Create agent
curl --request POST \
  --url http://localhost:8080/api/agents/create \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --header 'X-API-SECRET: <api-key>' \
  --data '
{
  "agent_name": "My New Agent"
}
'
{
  "message": "Agent created successfully",
  "status": "success",
  "error": null,
  "data": {
    "agent_id": "agent_b75cece1-7e81-4bde-bf8e-992ae93654c0",
    "organization_id": "org_xyz789",
    "created_at": "2025-01-15T12:45:00",
    "updated_at": "2025-01-15T12:45:00",
    "agent_name": "Customer Support Agent",
    "begin_message": "Hello! How can I help you?",
    "begin_message_variables": [
      "name",
      "company"
    ],
    "begin_message_delay_ms": 1000,
    "test_variables": {
      "name": "John",
      "company": "Acme Corp"
    },
    "webhook_url": "https://example.com/webhook",
    "post_call_webhook_id": "webhook_123",
    "end_call_after_silence_ms": 60000,
    "max_call_duration_ms": 3600000,
    "take_turn_after_silence_seconds": 6,
    "timezone": "America/New_York",
    "knowledge_base_ids": [
      "kb_123",
      "kb_456"
    ],
    "mcp_server_ids": [
      "mcp_123"
    ],
    "rag_config": {
      "chunks_to_retrieve": 10,
      "similarity_threshold": 0.7
    },
    "llm_config": {
      "system_message": "You are a helpful customer support agent.",
      "temperature": 0.7,
      "max_tokens": 1000,
      "tools": [],
      "system_message_variables": []
    },
    "stt_config": {
      "language": "en",
      "language_name": "English",
      "use_realtime": true
    },
    "tts_config": {
      "voice_id": "21m00Tcm4TlvDq8ikWAM",
      "voice_speed": 1,
      "language": "en",
      "language_name": "English",
      "pronunciation_dictionary_ids": [],
      "provider": "elevenlabs",
      "model": "eleven_multilingual_v2",
      "custom_api_url": null,
      "custom_api_key": null,
      "custom_secret_key": null,
      "custom_timeout": null,
      "custom_streaming": null,
      "custom_sample_rate": null
    },
    "post_call_analysis_data": [],
    "post_call_analysis_model": null,
    "post_call_evaluation_criteria": [],
    "widget_config": {},
    "additional_languages": [],
    "access_info": {}
  }
}

Authorizations

X-API-KEY
string
header
required

API Key for MCP server and external service authentication

X-API-SECRET
string
header
required

API Secret for MCP server and external service authentication

Body

application/json
agent_name
string
required
agent_id
string
organization_id
string
created_at
string<date-time>
updated_at
string<date-time>
begin_message
string
begin_message_variables
string[]
begin_message_delay_ms
integer<int32>
test_variables
object
webhook_url
string
post_call_webhook_id
string
end_call_after_silence_ms
integer<int32>
max_call_duration_ms
integer<int32>
take_turn_after_silence_seconds
number<double>
timezone
string
knowledge_base_ids
string[]
mcp_server_ids
string[]
rag_config
object
llm_config
object
stt_config
object
tts_config
object
post_call_analysis_data
object[]
post_call_analysis_model
string
post_call_evaluation_criteria
object[]
widget_config
object
access_info
object
fetch_webhook_data
boolean
use_rag
boolean
integrations
string[]
text_only
boolean
additional_languages
object[]

Response

Agent created successfully

message
string
status
string
error
string | null
data
object