Create Agent
Create an AI voice agent reachable via phone.
Endpoint
https://www.tabbly.io/api/create-agent
Create Agent
Create an AI voice agent for your organization. Phone number and prompt are optional at creation time.
Endpoint
http
POST https://www.tabbly.io/api/create-agentAuthentication
See Introduction. This is a POST endpoint — include api_key in the JSON request body.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
string | Yes | Your organization API key |
agent_name |
string | Yes | Name of the voice agent |
custom_first_line |
string | Yes | Initial greeting when the agent answers |
stt_language |
string | Yes | Speech-to-text language code (e.g. en) |
voice_id |
integer | Conditional | Voice library ID — use this or the voice fields below |
voice_name |
string | Conditional | Required with language_code and tts_library when voice_id is omitted |
language_code |
string | Conditional | Voice language code when not using voice_id |
tts_library |
string | Conditional | TTS provider when not using voice_id |
phone_number |
string | No | E.164 number — must belong to your org if provided |
prompt_text |
string | No | Agent behavior instructions |
enable_calendar_booking |
string | No | Calendar booking flag (optional; empty when disabled) |
agent_type |
string | No | Empty string or video only |
Example request
bash
curl -X POST "https://www.tabbly.io/api/create-agent" \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"agent_name": "My Voice Agent",
"custom_first_line": "Hello, how can I help you today?",
"stt_language": "en",
"voice_id": 125,
"prompt_text": "You are a helpful assistant."
}'Response
Success (200)
json
{
"status": "success",
"data": {
"agent_id": 6580,
"message": "Voice agent created successfully"
}
}Error responses
json
{
"status": "error",
"message": "Human-readable error description"
}| HTTP status | When |
|---|---|
| 400 | Missing required fields, invalid voice, invalid phone for org, invalid agent_type |
| 401 | Missing or invalid API key |
| 405 | Method not POST |
| 500 | Server or database error |
Notes
- Use Get Voices to find a
voice_id, or passvoice_name,language_code, andtts_librarydirectly. - If
phone_numberis provided, it must already be purchased and registered for your organization. enable_calendar_bookingis optional; when omitted it is stored as empty (disabled).