curl --location --request PUT 'https://api.weya.live/backend/api/whatsapp/remove-agent-in-whatsapp-number/6891f1d0c45d123456789abc' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "Whatsapp number unlinked successfully",
"errorMessage": null,
"data": []
}
Phone Numbers
Remove Agent from WhatsApp Number
Unassign the WhatsApp agent from a connected number.
PUT
/
api
/
whatsapp
/
remove-agent-in-whatsapp-number
/
{phoneNumberId}
curl --location --request PUT 'https://api.weya.live/backend/api/whatsapp/remove-agent-in-whatsapp-number/6891f1d0c45d123456789abc' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "Whatsapp number unlinked successfully",
"errorMessage": null,
"data": []
}
Overview
Remove the agent assigned to one of your WhatsApp integrations. The agent itself isn’t deleted, and the integration stays connected. The number has no agent until you assign one with Assign Agent to WhatsApp Number.Prerequisites
- An API key for your workspace
- The integration ID (
_idfrom Get WhatsApp Numbers)
Request
curl --location --request PUT 'https://api.weya.live/backend/api/whatsapp/remove-agent-in-whatsapp-number/6891f1d0c45d123456789abc' \
--header 'x-api-key: YOUR_API_KEY'
Response
{
"status": true,
"code": 200,
"message": "Whatsapp number unlinked successfully",
"errorMessage": null,
"data": []
}
Error Handling
Errors returnstatus: false, with the reason in errorMessage.
- 400 Bad Request –
Invalid Phone Number ID. - 401 Unauthorized – Missing or invalid API key.
- 404 Not Found –
WhatsApp number not found: it doesn’t exist or wasn’t connected 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?

