Overview
Update an existing SMS agent’s configuration. Modify the agent name, starting message, AI prompt, and automated drip message sequences.
Authentication
Path Parameters
The unique identifier of the SMS agent to update
Request Body
All fields are optional. Only include the fields you want to update.
Basic Settings
Display name for the agent
First message sent to leads. Supports variables: {{first_name}}, {{last_name}}, {{company}}
AI behavior instructions defining personality, goals, and conversation guidelines
Fields to extract from conversations using AI. Example: ["credit_score", "loan_amount", "interested", "timeline"]
Drip Schedule
Automated follow-up message sequence. Each message is sent after a delay if the lead hasn’t responded.
Drip Schedule Object
Field Type Description delay_hoursnumber Hours to wait before sending typestring "ai" for AI-generated or "custom" for fixed messagemessagestring The follow-up message (required if type is "custom")
Request Examples
Update Basic Settings
curl -X PATCH "https://api.teli.ai/v1/agents/agent_abc123" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_name": "Updated Sales Agent",
"starting_message": "Hi {{first_name}}! Ready to learn more about our services?",
"prompt": "You are a friendly sales representative. Your goal is to qualify leads and schedule demos. Be helpful and not pushy."
}'
curl -X PATCH "https://api.teli.ai/v1/agents/agent_abc123" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"extraction_fields": ["credit_score", "loan_amount", "annual_income", "interested", "timeline"]
}'
Update Drip Schedule
curl -X PATCH "https://api.teli.ai/v1/agents/agent_abc123" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"drip_schedule": [
{
"delay_hours": 4,
"type": "ai"
},
{
"delay_hours": 24,
"type": "custom",
"message": "Hi {{first_name}}, just checking in!"
},
{
"delay_hours": 72,
"type": "custom",
"message": "Last follow-up {{first_name}} - let me know if interested!"
}
]
}'
Disable Drip Messages
Send an empty array to disable automated follow-ups:
Response
Success Response
{
"success" : true ,
"agent_id" : "agent_abc123" ,
"message" : "Agent updated successfully"
}
Indicates successful update
The updated agent’s unique identifier
Success confirmation message
Error Responses
404 - Agent Not Found
500 - Update Failed
{
"success" : false ,
"error" : "Agent not found"
}
Dynamic Variables
Personalize messages with lead data:
Variable Description {{first_name}}Lead’s first name {{last_name}}Lead’s last name {{phone_number}}Lead’s phone number {{email}}Lead’s email address {{company}}Lead’s company name
Example:
{
"starting_message" : "Hi {{first_name}} from {{company}}! I'd love to chat about your needs."
}
Best Practices
Test first : Update a test agent before modifying production agents
Use personalization : Include {{first_name}} for better engagement
Keep drips concise : 2-4 follow-up messages work best
Space out drips : Give leads time to respond between messages
Clear prompts : Specific AI instructions produce better conversations
Notes
Drip schedule update : Resets the drip timer for all active leads in campaigns using this agent
Agent type : Cannot be changed from SMS to Voice
Active campaigns : Changes take effect for new conversations immediately