Remove phone number
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://blackbox.dasha.ai/api/v1/providers/twilio/{id}/phone-numbers/{phoneNumberId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://blackbox.dasha.ai/api/v1/providers/twilio/{id}/phone-numbers/{phoneNumberId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://blackbox.dasha.ai/api/v1/providers/twilio/{id}/phone-numbers/{phoneNumberId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Remove phone number
Removes an imported phone number from the provider. Detaches the phone number from the Twilio SIP trunk and deletes it from the system. The phone number remains in your Twilio account and can be imported again later.
DELETE
/
api
/
v1
/
providers
/
twilio
/
{id}
/
phone-numbers
/
{phoneNumberId}
Remove phone number
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://blackbox.dasha.ai/api/v1/providers/twilio/{id}/phone-numbers/{phoneNumberId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://blackbox.dasha.ai/api/v1/providers/twilio/{id}/phone-numbers/{phoneNumberId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://blackbox.dasha.ai/api/v1/providers/twilio/{id}/phone-numbers/{phoneNumberId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Removal Process
When you remove a phone number from a provider:- The phone number is detached from the Twilio SIP trunk
- Local records are deleted from the system
- Any agent links are removed (if force=true)
Force Removal
If the phone number is linked to agents or used in their outbound configuration:- Without
force=true: Returns 409 Conflict with affected agent details - With
force=true: Removes the phone number from all affected agents before deletion
After Removal
The phone number:- Remains in your Twilio account
- Can be imported again via the
/import-numbersendpoint - Will no longer route calls through this provider
Impact on Calls
- Inbound calls: Will no longer be routed to agents
- Outbound calls: Agents using this number for caller ID will fail
Was this page helpful?