Create Agent
Create a new agent for the authenticated user.
Request Body
Agent objectAgent conversation configuration
Platform-specific settings
Widget configuration for web integration
curl -X POST "https://api.example.com/api/v1/agents" \
-H "X-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"agent": {
"name": "Customer Support Agent",
"tags": ["support", "voice"],
"conversation_config": {
"temperature": 0.7,
"model": "gpt-4"
},
"platform_settings": {},
"widget_config": {}
}
}'
Response
Response status information
Created agent object (see Agent schema)
{
"status": {
"code": 201,
"message": "Agent created successfully"
},
"data": {
"id": "123",
"name": "Customer Support Agent",
"tags": ["support", "voice"],
"conversation_config": {
"temperature": 0.7,
"model": "gpt-4"
},
"platform_settings": {},
"published": false,
"published_at": null,
"elevenlabs_agent_id": null,
"version": 1,
"phone_numbers": [],
"user_id": 1,
"user_email": "[email protected]",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
}
Error Responses
Unauthorized - Invalid or missing authentication
Validation error - Invalid request body