> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tabbly.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Agent

> Create a new voice AI agent programmatically

**/create-agent**

Create a new voice AI agent with specified configuration. The agent can be customized with prompts, voice settings, and conversation flows.

## Request

**organization\_id** `integer` *required*

Your organization ID

**api\_key** `string` *required*

Your organization API key

**agent\_name** `string` *required*

Name for the agent

**agent\_description** `string`

Description of the agent's purpose

**base\_prompt** `string` *required*

Base prompt/instructions for the agent's behavior

**voice\_id** `integer` *required*

ID of the voice to use (from Get Voices endpoint)

**language** `string` (default: en)

Primary language code (e.g., "en", "es", "hi")

**greeting** `string`

Custom greeting message

**conversation\_goal** `string`

Primary goal of the agent (e.g., "schedule\_appointment", "qualify\_lead")

## Examples

```bash cURL theme={null}
curl -X POST 'https://www.tabbly.io/dashboard/agents/endpoints/create-agent' \
-H 'Content-Type: application/json' \
-d '{
    "organization_id": 244,
    "api_key": "your_api_key",
    "agent_name": "Customer Support Agent",
    "agent_description": "Handles customer support inquiries",
    "base_prompt": "You are a helpful customer support agent...",
    "voice_id": 5,
    "language": "en",
    "greeting": "Hello! How can I help you today?",
    "conversation_goal": "customer_support"
}'
```

```python Python theme={null}
import requests

data = {
    'organization_id': 244,
    'api_key': 'your_api_key',
    'agent_name': 'Customer Support Agent',
    'agent_description': 'Handles customer support inquiries',
    'base_prompt': 'You are a helpful customer support agent...',
    'voice_id': 5,
    'language': 'en',
    'greeting': 'Hello! How can I help you today?',
    'conversation_goal': 'customer_support'
}

response = requests.post(
    'https://www.tabbly.io/dashboard/agents/endpoints/create-agent',
    json=data
)

print(response.json())
```

```javascript Node.js theme={null}
const axios = require('axios');

const data = {
    organization_id: 244,
    api_key: 'your_api_key',
    agent_name: 'Customer Support Agent',
    agent_description: 'Handles customer support inquiries',
    base_prompt: 'You are a helpful customer support agent...',
    voice_id: 5,
    language: 'en',
    greeting: 'Hello! How can I help you today?',
    conversation_goal: 'customer_support'
};

axios.post('https://www.tabbly.io/dashboard/agents/endpoints/create-agent', data)
    .then(response => console.log(response.data))
    .catch(error => console.error(error));
```

## Response

**success** `boolean`

Indicates if the agent was successfully created

**agent\_id** `integer`

ID of the newly created agent

**agent\_name** `string`

Name of the created agent

**status** `string`

Status of the agent (active, draft)

### Success Response (200 OK)

```json theme={null}
{
    "success": true,
    "agent_id": 45,
    "agent_name": "Customer Support Agent",
    "status": "draft"
}
```

## Error Responses

**400** `object`

Missing required fields or invalid parameters

**404** `object`

Organization not found or invalid voice\_id

**500** `object`

Server error


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.