Skip to main content
POST
/
delete-agent
Delete voice agent
curl --request POST \
  --url https://www.tryunleashx.com/api/v1/global/delete-agent \
  --header 'Content-Type: application/json' \
  --header 'token: <token>' \
  --data '
{
  "agent_id": 123
}
'

Delete Voice Agent API

This documentation explains how to delete a voice agent using the API.

Endpoint

POST /api/v1/global/agents/delete

Authentication

Include your API token in the request header:
token: <your_api_token>
or
api_access_token: <your_api_token>

Request Body

{
  "agent_id": 123
}

Query Parameters (Alternative)

You can also pass agent_id as a query parameter:
POST /api/v1/global/agents/delete?agent_id=123

Required Fields

FieldTypeDescription
agent_idintegerID of the agent to delete

Success Response

Status Code: 200 OK
{
  "success": true,
  "message": "Voice agent deleted successfully",
  "data": {
    "agent_id": 123
  }
}

Error Responses

400 Bad Request

{
  "error": true,
  "message": "Agent ID is required"
}

401 Unauthorized

{
  "error": true,
  "message": "Invalid Auth Key or Session Expired"
}

404 Not Found

{
  "error": true,
  "message": "Agent not found"
}

Example Request

Using Request Body

curl -X POST https://www.tryunleashx.com/api/v1/global/agents/delete \
  -H "Content-Type: application/json" \
  -H "token: your_api_token_here" \
  -d '{
    "agent_id": 123
  }'

Using Query Parameter

curl -X POST "https://www.tryunleashx.com/api/v1/global/agents/delete?agent_id=123" \
  -H "Content-Type: application/json" \
  -H "token: your_api_token_here"

Notes

  • Deleting an agent is a permanent action. The agent will be marked as deleted and cannot be recovered.
  • The agent must exist and belong to your workspace.
  • Once deleted, the agent cannot be used for making calls.

Headers

token
string
required

API token for authentication

Query Parameters

agent_id
integer

ID of the agent to delete (can also be provided in request body)

Body

application/json
agent_id
integer
required

ID of the agent to delete

Response

Voice agent deleted successfully