curl --location --request DELETE 'https://api.weya.live/backend/api/agents/687b1c2ab7c7d3f123456789' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "Agent deleted successfully",
"errorMessage": null,
"data": []
}
Agents
Delete Agent
Permanently delete one of your AI agents.
DELETE
/
api
/
agents
/
{id}
curl --location --request DELETE 'https://api.weya.live/backend/api/agents/687b1c2ab7c7d3f123456789' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "Agent deleted successfully",
"errorMessage": null,
"data": []
}
Overview
Permanently delete an agent created by the user who owns the API key, together with all its saved versions and unsaved drafts. The API doesn’t check whether phone numbers or campaigns still use the agent, and doesn’t unassign it from them. Assign another agent to those phone numbers before deleting, or their calls won’t have an agent.Deleting an agent can’t be undone.
Prerequisites
- An API key for your workspace
- The agent’s ID, from Get Agents
Request
curl --location --request DELETE 'https://api.weya.live/backend/api/agents/687b1c2ab7c7d3f123456789' \
--header 'x-api-key: YOUR_API_KEY'
Response
{
"status": true,
"code": 200,
"message": "Agent deleted successfully",
"errorMessage": null,
"data": []
}
Error Handling
Errors returnstatus: false, with the reason in errorMessage.
- 400 Bad Request –
idisn’t a valid ID. - 401 Unauthorized – Missing or invalid API key.
- 404 Not Found –
Agent not found: the agent doesn’t exist or wasn’t created by the user who owns the API key. - 500 Internal Server Error – Unexpected server error.
Knowledge bases, phone numbers and call history are not deleted with the agent.
Was this page helpful?

