Skip to main content
PATCH
/
v1
/
agents
/
{agent_id}
{
  "success": true,
  "agent_id": "1763490400021x448481236873124087",
  "message": "Agent updated successfully",
  "powered_by": "Teli"
}

Overview

Update an existing agent’s configuration including name, prompts, messages, and settings.
This endpoint updates agent properties. For voice agent tools (function calling, transfers, etc.), use Update Voice Agent Tools.

Authentication

X-API-Key
string
required
Your Teli API key

Path Parameters

agent_id
string
required
The unique identifier of the agent to update

Request Body

All fields are optional - only send the fields you want to update.

Common Fields (SMS & Voice)

agent_name
string
Updated agent name
prompt
string
Updated AI instructions/system prompt
starting_message
string
Updated first message to user. Supports variables like {{first_name}}
drip_schedule
array
Updated drip message sequence (SMS agents only)

Request Examples

Update SMS Agent

curl -X PATCH "https://api.teli.ai/v1/agents/1762896437306x529035742905669631" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_name": "Updated SMS Agent",
    "starting_message": "Hi {{first_name}}, we have an exciting update for you!",
    "prompt": "You are a friendly sales assistant helping customers discover our products..."
  }'

Update Voice Agent

curl -X PATCH "https://api.teli.ai/v1/agents/1763763759612x739630924151608142" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_name": "Sophie Agent",
    "starting_message": "Hi {{first_name}}, did you want to develop a software for your business?",
    "prompt": "You are Sarah Johnson working for Tech Solutions Inc..."
  }'

Update Only Name

{
  "agent_name": "New Agent Name"
}

Update with Drip Schedule (SMS)

{
  "agent_name": "Follow-up Campaign",
  "starting_message": "Hi {{first_name}}, thanks for your interest!",
  "prompt": "You are following up with leads...",
  "drip_schedule": [
    {
      "delay_minutes": 1440,
      "message": "Hi {{first_name}}, just following up on our conversation..."
    },
    {
      "delay_minutes": 4320,
      "message": "Hi {{first_name}}, wanted to check if you had any questions..."
    }
  ]
}

Response

Success Response

{
  "success": true,
  "agent_id": "1763490400021x448481236873124087",
  "message": "Agent updated successfully",
  "powered_by": "Teli"
}
success
boolean
Indicates successful update
agent_id
string
The updated agent’s unique identifier
message
string
Success message
powered_by
string
Platform identifier (“Teli”)

Error Responses

{
  "error": "Agent not found",
  "success": false,
  "powered_by": "Teli"
}

Common Update Scenarios

Scenario 1: Improve Agent Prompt

Update the AI instructions to better handle specific scenarios:
{
  "prompt": "You are a sales assistant. When customers ask about pricing, provide accurate quotes. If they express budget concerns, offer flexible payment options. Always be professional and helpful."
}

Scenario 2: Change Starting Message

Update the first message users receive:
{
  "starting_message": "Hi {{first_name}}! Thanks for reaching out. How can I help you today?"
}

Scenario 3: Rebrand Agent

Update name and messaging for rebranding:
{
  "agent_name": "New Brand Support Bot",
  "starting_message": "Welcome to New Brand! How can we assist you?",
  "prompt": "You represent New Brand, a leading provider of..."
}

Scenario 4: Update SMS Drip Sequence

Modify follow-up message timing and content:
{
  "drip_schedule": [
    {
      "delay_minutes": 60,
      "message": "Quick follow-up {{first_name}}..."
    },
    {
      "delay_minutes": 1440,
      "message": "Checking in {{first_name}}..."
    }
  ]
}

Dynamic Variables

Use dynamic variables in messages for personalization: Common variables:
  • {{first_name}} - Customer’s first name
  • {{last_name}} - Customer’s last name
  • {{phone_number}} - Customer’s phone
  • {{email}} - Customer’s email
  • {{company}} - Company name
  • Custom variables from conversation
Example:
{
  "starting_message": "Hi {{first_name}} from {{company}}! Ready to discuss your software needs?"
}

Best Practices

Test changes: Test updated agents before deploying to production campaigns
Iterate gradually: Update one field at a time to see impact
Keep prompts focused: Clear, concise instructions work best
Use variables: Personalize messages with and other variables
Version control: Keep copies of working prompts before major changes

Limitations

  • Agent type cannot be changed - Cannot convert SMS agent to Voice or vice versa
  • Drip schedules - Only apply to SMS agents
  • Tools - Must use /tools endpoint (voice agents only)


Voice Agent Advanced Features

For Voice Agent Tools: To update function calling, transfers, API integrations, and other tools, use the dedicated Update Voice Agent Tools endpoint.Voice agent tools include:
  • End Call, Transfer Call, Custom API Integration
  • Calendar Integration (Cal.com)
  • Agent Transfer, Send SMS, Extract Variables
  • And more!
See the tools documentation for complete details.
For Knowledge Bases: Link knowledge bases to enhance voice agents with URLs, documents, and custom knowledge.Update knowledge_base_ids to link/unlink knowledge bases. Configure retrieval settings via kb_config.See Create Knowledge Base to create KBs first.

Support

Need help updating agents?
Update your agents easily with this endpoint! 🚀