Skip to main content
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));
{
  "type": "<string>",
  "title": "<string>",
  "status": 123,
  "detail": "<string>",
  "instance": "<string>"
}

Removal Process

When you remove a phone number from a provider:
  1. The phone number is detached from the Twilio SIP trunk
  2. Local records are deleted from the system
  3. 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-numbers endpoint
  • 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

Path Parameters

id
string<uuid>
required

Provider identifier

phoneNumberId
string<uuid>
required

Phone number identifier

Query Parameters

force
boolean
default:false

Force removal even if phone number is used by agents

Response

Phone number removed successfully