curl --location --request DELETE 'https://api.weya.live/backend/api/call/delete-phone/64e5f12345abcdef87654321' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "Phone deleted successfully",
"errorMessage": null,
"data": {
"deletedId": "64e5f12345abcdef87654321"
}
}
Phone Numbers
Delete Phone Number
Permanently remove a phone number from your workspace.
DELETE
/
api
/
call
/
delete-phone
/
{phoneId}
curl --location --request DELETE 'https://api.weya.live/backend/api/call/delete-phone/64e5f12345abcdef87654321' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "Phone deleted successfully",
"errorMessage": null,
"data": {
"deletedId": "64e5f12345abcdef87654321"
}
}
Overview
Permanently delete a phone number you no longer use. It is removed from your phone number lists and can’t be selected for new campaigns. The number is not removed from campaigns that already use it, and the API doesn’t check for them. Campaigns that call from a deleted number can’t place calls or retries from it.Prerequisites
- An API key for your workspace
- The phone number’s ID (
_idfrom Get Phone Numbers). The number must have been added by the user who owns the API key. - Remove the number from any running campaign first with Update Campaign.
Request
curl --location --request DELETE 'https://api.weya.live/backend/api/call/delete-phone/64e5f12345abcdef87654321' \
--header 'x-api-key: YOUR_API_KEY'
Response
{
"status": true,
"code": 200,
"message": "Phone deleted successfully",
"errorMessage": null,
"data": {
"deletedId": "64e5f12345abcdef87654321"
}
}
Error Handling
Errors returnstatus: false, with the reason in errorMessage.
- 400 Bad Request –
Invalid Phone ID. - 401 Unauthorized – Missing or invalid API key.
- 404 Not Found –
Phone not found: the number doesn’t exist, is already deleted, or wasn’t added by the user who owns the API key. - 500 Internal Server Error – Unexpected server error.
Deletion can’t be undone. To use the number again, add it again with Add Phone Number; it gets a new ID.
Was this page helpful?

