curl --location --request DELETE 'https://api.weya.live/backend/api/whatsapp/delete-whatsapp-agent/6894a98a7fcde123456789ab' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "Whatsapp agent deleted successfully",
"errorMessage": null,
"data": []
}
WhatsApp
Delete WhatsApp Agent
Permanently delete one of your WhatsApp agents.
DELETE
/
api
/
whatsapp
/
delete-whatsapp-agent
/
{agentId}
curl --location --request DELETE 'https://api.weya.live/backend/api/whatsapp/delete-whatsapp-agent/6894a98a7fcde123456789ab' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "Whatsapp agent deleted successfully",
"errorMessage": null,
"data": []
}
Overview
Permanently delete a WhatsApp agent created by the user who owns the API key. The API doesn’t unassign the agent from a WhatsApp number. Remove it first with Remove Agent from WhatsApp Number, or assign another agent, so the number isn’t left pointing at a deleted agent.This can’t be undone.
Prerequisites
- An API key for your workspace
- The agent’s ID, from Get WhatsApp Agents
Request
curl --location --request DELETE 'https://api.weya.live/backend/api/whatsapp/delete-whatsapp-agent/6894a98a7fcde123456789ab' \
--header 'x-api-key: YOUR_API_KEY'
Response
{
"status": true,
"code": 200,
"message": "Whatsapp agent deleted successfully",
"errorMessage": null,
"data": []
}
Error Handling
Errors returnstatus: false, with the reason in errorMessage.
- 400 Bad Request –
Invalid Agent ID. - 401 Unauthorized – Missing or invalid API key.
- 404 Not Found –
WhatsApp agent not found: it doesn’t exist, is already deleted, or wasn’t created by the user who owns the API key. - 429 Too Many Requests – More than 1,000 WhatsApp requests in 15 minutes from your IP address.
- 500 Internal Server Error – Unexpected server error.
Was this page helpful?

