curl -X DELETE "https://agent.api.lyzr.app/v2/agent/{agent_id}" \
     -H "accept: application/json"\
     -H "Content-Type: application/json" \
     -H "x-api-key: your_Lyzr_API_Key_Here"
{
    "message": "Agent deleted successfully."
}

Endpoint: DELETE /v2/agent/{agent_id}

This endpoint is used to delete a specific agent identified by its unique agent ID. This operation removes the agent and its associated data from the system.

Parameters

agent_id
string
required

The unique identifier of the agent to be deleted.

Curl
curl -X DELETE "https://agent.api.lyzr.app/v2/agent/{agent_id}" \
     -H "accept: application/json"\
     -H "Content-Type: application/json" \
     -H "x-api-key: your_Lyzr_API_Key_Here"
Python
import requests

agent_id = "60d0fe4f531xxxxxx"  # Replace with the actual agent ID

url = f"https://agent.api.lyzr.app/v2/agent/{agent_id}"

headers = {
    "Accept": "application/json"
}

response = requests.delete(url, headers=headers)
{
    "message": "Agent deleted successfully."
}

Response Parameters

message
dict

Confirmation message about the agent’s deletion.