Update Phone Agent
Phone Numbers
Update Phone Agent
Link voice agents to a phone number for inbound and outbound calls
POST
Update Phone Agent
Description
Updates the agent assignments for a phone number. You can configure separate agents for handling inbound calls (calls received) and outbound calls (calls made from this number). This is essential for:- Inbound AI receptionist: Link an agent to answer incoming calls
- Outbound campaigns: Link an agent for making automated outbound calls
- Dual-purpose numbers: Use different agents for inbound vs outbound
Authentication
Your Teli API key
Path Parameters
Phone number in E.164 format (e.g.,
+14155551234)Request Body
Agent ID for handling incoming calls to this number.
- Use the
agent_idreturned when creating a voice agent - Set to empty string
""ornullto clear the assignment
"agent_abc123"Agent ID for making outbound calls from this number.
- Used in voice campaigns when this number is the caller ID
- Set to empty string
""ornullto clear the assignment
"agent_xyz789"Optional friendly name for the phone number.Example:
"Main Reception Line"At least one of
inbound_agent_id, outbound_agent_id, or nickname is required.Response Fields
Whether the update was successful
The phone number that was updated
Status message
The inbound agent ID (if updated)
The outbound agent ID (if updated)
The nickname (if updated)
Always returns “Teli”
Example Requests
Link Inbound Agent (AI Receptionist)
cURL
JavaScript
Python
Link Both Inbound and Outbound Agents
cURL
Clear an Agent Assignment
cURL
Example Responses
200 Success
400 Missing Fields
500 Agent Not Found
500 Phone Not Found
Use Cases
1. AI Receptionist (Inbound Only)
Link a voice agent to answer incoming calls automatically:2. Outbound Campaign Number
Link an agent for making outbound calls:3. Dual-Purpose Number
Use different agents for inbound vs outbound:- Incoming calls: Handled by support agent
- Outgoing campaigns: Uses sales agent
Notes
- Agent IDs: Use the
agent_idreturned fromPOST /v1/agents(voice agent creation) - Phone format: Always use E.164 format (
+1XXXXXXXXXX) - Clearing agents: Set to empty string
""ornullto remove an agent assignment - Both methods supported:
POSTandPATCHare both accepted
Related Endpoints
POST /v1/voice/phone-numbers/create- Create a new phone numberGET /v1/voice/phone-numbers- List phone numbersPOST /v1/agents- Create a voice agentGET /v1/agents- List agentsPOST /v1/voice/campaigns- Start a voice campaign

