Skip to main content
POST
/
v1
/
agents
curl -X POST https://api.teli.ai/v1/agents \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_type": "sms",
    "agent_name": "Mortgage Lead Qualifier",
    "starting_message": "Hi {{first_name}}, interested in refinancing your mortgage?",
    "prompt": "You are a mortgage specialist. Qualify leads by asking about their credit score, loan amount, and timeline. Be helpful and professional.",
    "organization_id": "1763070568417x631086913669115287",
    "user_id": "1763072368418x263803518630956376",
    "extraction_fields": ["credit_score", "loan_amount", "interested", "timeline"],
    "drip_schedule": [
      {"delay_hours": 24, "type": "ai"},
      {"delay_hours": 72, "type": "custom", "message": "Hi {{first_name}}, still interested in refinancing?"}
    ]
  }'
{
  "success": true,
  "agent_id": "1763072369786x980265710064263640",
  "agent_type": "sms",
  "agent_name": "Mortgage Lead Qualifier",
  "has_drip_schedule": true,
  "has_extraction_fields": true,
  "extraction_fields": ["credit_score", "loan_amount", "interested", "timeline"],
  "organization_id": "1763070568417x631086913669115287",
  "created_by": "1763072368418x263803518630956376",
  "message": "SMS agent created successfully",
  "powered_by": "Teli"
}
Create an SMS agent for text-based AI conversations. SMS agents are simple to set up and support automated drip campaigns.
SMS agents have no additional charges beyond standard SMS costs per message.

Authorizations

X-API-Key
string
required
Authentication header containing your API key.

Required Fields

agent_type
string
required
Must be "sms" for SMS agents.
agent_name
string
required
Display name for the agent.Example: "Sales Follow-up Agent"
starting_message
string
required
First message sent to contacts. Supports variables: {{first_name}}, {{last_name}}Example: "Hi {{first_name}}, interested in our services?"
prompt
string
required
AI behavior instructions. Tells the agent how to respond.Example: "You are a sales agent for Acme Corp. Ask users about their needs, budget, and timeline. Be friendly and helpful."
organization_id
string
required
Organization unique_id.Example: "1763070568417x631086913669115287"
user_id
string
required
User unique_id (agent creator).Example: "1763072368418x263803518630956376"

Optional Fields

extraction_fields
array
Fields to extract from conversations using AI. The AI will analyze conversations and extract these data points.Example:
["credit_score", "loan_amount", "annual_income", "interested", "timeline"]
Use descriptive field names like credit_score instead of abbreviations like cs.
drip_schedule
array
Automated follow-up messages if the contact doesn’t respond.Each item: { "delay_hours": number, "type": "ai"|"custom", "message": string }
  • delay_hours: Hours to wait before sending
  • type: "ai" for AI-generated follow-up, "custom" for your specific message
  • message: Required if type is "custom"
Example:
[
  {"delay_hours": 24, "type": "ai"},
  {"delay_hours": 72, "type": "custom", "message": "Hi {{first_name}}, just following up!"},
  {"delay_hours": 168, "type": "custom", "message": "Last chance - let me know if I can help!"}
]
curl -X POST https://api.teli.ai/v1/agents \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_type": "sms",
    "agent_name": "Mortgage Lead Qualifier",
    "starting_message": "Hi {{first_name}}, interested in refinancing your mortgage?",
    "prompt": "You are a mortgage specialist. Qualify leads by asking about their credit score, loan amount, and timeline. Be helpful and professional.",
    "organization_id": "1763070568417x631086913669115287",
    "user_id": "1763072368418x263803518630956376",
    "extraction_fields": ["credit_score", "loan_amount", "interested", "timeline"],
    "drip_schedule": [
      {"delay_hours": 24, "type": "ai"},
      {"delay_hours": 72, "type": "custom", "message": "Hi {{first_name}}, still interested in refinancing?"}
    ]
  }'
{
  "success": true,
  "agent_id": "1763072369786x980265710064263640",
  "agent_type": "sms",
  "agent_name": "Mortgage Lead Qualifier",
  "has_drip_schedule": true,
  "has_extraction_fields": true,
  "extraction_fields": ["credit_score", "loan_amount", "interested", "timeline"],
  "organization_id": "1763070568417x631086913669115287",
  "created_by": "1763072368418x263803518630956376",
  "message": "SMS agent created successfully",
  "powered_by": "Teli"
}

Response Fields

agent_id
string
Agent identifier. Use this when creating SMS campaigns.
agent_type
string
Always "sms" for SMS agents.
has_drip_schedule
boolean
Whether automated follow-ups are configured.
has_extraction_fields
boolean
Whether data extraction is configured.
extraction_fields
array
List of fields that will be extracted from conversations.

Extraction Fields Best Practices

  • Use descriptive names: credit_score instead of cs
  • Keep fields focused: Extract specific data points like loan_amount, timeline
  • Common fields: interested, budget, timeline, email, best_time_to_call
  • The AI will extract these values as contacts provide them in conversation

Drip Schedule Best Practices

  • 24 hours: Quick check-in, shows attentiveness
  • 72 hours: Provide value or new information
  • 168 hours (1 week): Final gentle follow-up
  • Use type: "ai" for dynamic AI-generated messages
  • Use type: "custom" for specific messaging you control
  • Use {{first_name}} for personalization

Next Steps

  1. Create Contact List - Upload leads
  2. Create SMS Campaign - Launch your campaign
  3. Get SMS Extractions - Retrieve extracted data