Create a reusable AI agent with custom conversation prompts. Supports both SMS and Voice agents.
SMS agents have no additional charges beyond standard SMS costs. Voice agents use Teli Voice platform with per-second billing.
Authorizations
Authentication header containing your API key.
Body
Agent type: sms or voice Example: "voice"
Display name for the agent. Example: "Sales Follow-up Agent" or "Sophie Agent"
First message/greeting sent to contacts. Supports variables: {{first_name}}, {{last_name}} Example: "Hi {{first_name}}, interested in our services?"
AI behavior instructions. Tells the agent how to respond. Example: "You are working for Pranta Nir Software Solutions. You are supposed to ask users if they want any consulting or software development support. If yes, ask them their budget for the software."
Organization unique_id. Example: "1763070568417x631086913669115287"
User unique_id (agent creator). Example: "1763072368418x263803518630956376"
SMS agents only. Automated follow-up messages.Each item: { "day": number, "message": string } Example: [
{ "day" : 1 , "message" : "Just checking in from yesterday!" },
{ "day" : 3 , "message" : "Still here if you need anything!" }
]
Voice agents only. Voice ID for text-to-speech (e.g., “11labs-Adrian”, “11labs-Josh”)Default: "11labs-Adrian"
Voice agents only. Enable voicemail detection.Default: false
Voice agents only. Message to leave if voicemail is detected.
Voice agents only. Language code (e.g., “en-US”, “es-ES”, “fr-FR”)Default: "en-US"
Voice agents only. Tools for function calling (end call, transfer, custom API, etc.)See Update Agent Tools for details.
Voice agents only. Array of knowledge base IDs to link to this agent.Example: ["knowledge_base_7a0682ce5fc02413"] Agent will automatically retrieve relevant information from these KBs during calls.
Voice agents only. Knowledge base retrieval configuration.Properties:
top_k (number): Chunks to retrieve (1-10, default: 3)
filter_score (number): Similarity threshold (0-1, default: 0.6)
Example: {
"top_k" : 3 ,
"filter_score" : 0.6
}
cURL (SMS Agent)
Voice Agent (Basic)
Voice Agent with Knowledge Base
JavaScript
Python
curl -X POST https://api.example.com/v1/agents \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_type": "sms",
"agent_name": "Sales Follow-up Agent",
"starting_message": "Hi {{first_name}}, interested in our services?",
"prompt": "You are a helpful sales agent. Ask about their budget and timeline.",
"organization_id": "1763070568417x...",
"user_id": "1763072368418x...",
"drip_schedule": [
{"day": 1, "message": "Just checking in!"},
{"day": 3, "message": "Happy to help when you' \' 're ready!"}
]
}'
201 (SMS Agent)
201 (Voice Agent)
400 (Missing Required Fields)
400 (Invalid Agent Type)
400 (Missing Voice ID)
500 (Creation Failed)
400
{
"success" : true ,
"agent_id" : "1763072369786x980265710064263640" ,
"agent_type" : "sms" ,
"agent_name" : "Sales Follow-up Agent" ,
"has_drip_schedule" : true ,
"organization_id" : "1763072364720x..." ,
"created_by" : "1763072368418x..." ,
"message" : "SMS agent created successfully" ,
"powered_by" : "Teli"
}
Response
Agent identifier. Use this when creating campaigns.
Agent unique identifier (alternative ID)
Confirms the agent type: sms or voice
Whether automated follow-ups are configured (SMS agents only)
Voice agent ID (voice agents only)
Voice LLM ID (voice agents only)
Voice ID for TTS (voice agents only)
Agent Types
SMS Agents
Used for text-based conversations
Support drip schedules for automated follow-ups
No additional charges beyond SMS costs
Can be configured with SMS-to-voice transfer
Voice Agents
Used for phone call conversations
Powered by Teli Voice platform
Support voicemail detection and custom voicemails
Billed per second of call time
Can be used standalone or with SMS-to-voice transfer
Notes
Agent IDs are unique across your organization
Prompts support variable substitution: {'{'}{'{'}}first_name{'}'}{'}'}}, {'{'}{'{'}}last_name{'}'}{'}}'}
Voice agents are created on Teli Voice platform and automatically configured
SMS agents can trigger voice agents when SMS-to-voice is enabled in campaigns
Both agent types support organization-wide or user-specific visibility