Skip to main content
DELETE
/
v1
/
agents
/
{id}
Delete Agent
curl --request DELETE \
  --url https://api.example.com/v1/agents/{id} \
  --header 'X-API-Key: <x-api-key>'
{
  "success": true,
  "message": "<string>",
  "agent_id": "<string>",
  "powered_by": "<string>"
}

Description

Deletes an agent from your organization. This endpoint works for both SMS and Voice agents.

Authentication

X-API-Key
string
required
Your Teli API key

Path Parameters

id
string
required
The agent’s unique identifier (agent_id)Example: "1767376530308x263645226803702167"

Response Fields

success
boolean
Whether the deletion was successful
message
string
Confirmation message
agent_id
string
The deleted agent’s ID
powered_by
string
Always returns “Teli”

Example Request

cURL
curl -X DELETE "https://api.teli.ai/v1/agents/1767376530308x263645226803702167" \
  -H "X-API-Key: YOUR_API_KEY"
JavaScript
const response = await fetch('https://api.teli.ai/v1/agents/1767376530308x263645226803702167', {
  method: 'DELETE',
  headers: {
    'X-API-Key': 'YOUR_API_KEY'
  }
});

const data = await response.json();
console.log(data);
Python
import requests

response = requests.delete(
    'https://api.teli.ai/v1/agents/1767376530308x263645226803702167',
    headers={'X-API-Key': 'YOUR_API_KEY'}
)

print(response.json())

Example Response

200
{
  "success": true,
  "message": "Agent deleted successfully",
  "agent_id": "1767376530308x263645226803702167",
  "powered_by": "Teli"
}
404
{
  "success": false,
  "error": "Agent not found",
  "powered_by": "Teli"
}
500
{
  "success": false,
  "error": "Failed to delete agent",
  "powered_by": "Teli"
}

Notes

  • Deleted agents will no longer appear in the list agents response
  • For voice agents, the agent is also removed from the Teli Voice platform
  • This action cannot be undone
  • Any campaigns using this agent will need to be updated with a new agent