Set a number's agent
curl --request PUT \
--url https://api.telleo.ai/v1/numbers/{id}/agent \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agent_id": "17ea33d2-5b6c-4c1e-9a1f-2d4e6f8a9b0c"
}
'import requests
url = "https://api.telleo.ai/v1/numbers/{id}/agent"
payload = { "agent_id": "17ea33d2-5b6c-4c1e-9a1f-2d4e6f8a9b0c" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({agent_id: '17ea33d2-5b6c-4c1e-9a1f-2d4e6f8a9b0c'})
};
fetch('https://api.telleo.ai/v1/numbers/{id}/agent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"object": "number",
"phone_number": "+918045001234",
"label": "<string>",
"provider": "plivo",
"enabled": true,
"agent": {
"id": "<string>",
"object": "<string>",
"name": "<string>",
"enabled": true,
"direction": "<string>",
"deleted": true
},
"routing": {
"type": "ai_agent",
"description": "<string>",
"menu_id": "<string>",
"menu_name": "<string>",
"ai_agent_steps": 123,
"shared_with": [
"<string>"
],
"agents": [
{
"id": "<string>",
"object": "<string>",
"name": "<string>",
"enabled": true,
"direction": "<string>",
"deleted": true
}
]
}
}Agents
Set a number's agent
Points the number’s one AI agent step at another agent. Only when it is unambiguous: the number plays an IVR menu with exactly one AI agent step that no other number shares. Otherwise 409 number_routing_complex with details.reason (no_menu, menu_without_ai_agent, menu_with_several_ai_agents, menu_shared); change those in the dashboard’s IVR builder. The agent must be on and answer calls (inbound or both).
Scope: agents:manage.
PUT
/
numbers
/
{id}
/
agent
Set a number's agent
curl --request PUT \
--url https://api.telleo.ai/v1/numbers/{id}/agent \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agent_id": "17ea33d2-5b6c-4c1e-9a1f-2d4e6f8a9b0c"
}
'import requests
url = "https://api.telleo.ai/v1/numbers/{id}/agent"
payload = { "agent_id": "17ea33d2-5b6c-4c1e-9a1f-2d4e6f8a9b0c" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({agent_id: '17ea33d2-5b6c-4c1e-9a1f-2d4e6f8a9b0c'})
};
fetch('https://api.telleo.ai/v1/numbers/{id}/agent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"object": "number",
"phone_number": "+918045001234",
"label": "<string>",
"provider": "plivo",
"enabled": true,
"agent": {
"id": "<string>",
"object": "<string>",
"name": "<string>",
"enabled": true,
"direction": "<string>",
"deleted": true
},
"routing": {
"type": "ai_agent",
"description": "<string>",
"menu_id": "<string>",
"menu_name": "<string>",
"ai_agent_steps": 123,
"shared_with": [
"<string>"
],
"agents": [
{
"id": "<string>",
"object": "<string>",
"name": "<string>",
"enabled": true,
"direction": "<string>",
"deleted": true
}
]
}
}Authorizations
Your AI calling API key (vak_call_…). Authorization: Bearer <key> also works.
Path Parameters
Body
application/json
Response
The number with its new agent.