> ## Documentation Index
> Fetch the complete documentation index at: https://blackbox.dasha.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

## 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


## OpenAPI

````yaml https://blackbox.dasha.ai/swagger/v1/swagger.json delete /api/v1/providers/twilio/{id}/phone-numbers/{phoneNumberId}
openapi: 3.0.4
info:
  title: Dasha BlackBox Agent API
  description: API for managing AI agents and calls
  contact:
    name: DashaAI Team
    email: support@dasha.ai
  version: v1
servers:
  - url: https://blackbox.dasha.ai
    description: Dasha BlackBox Agent API
security:
  - ApiKey: []
  - OAuth: []
tags:
  - name: ActivityLogs
  - name: Agents
  - name: AgentTestCases
  - name: CallResults
  - name: Calls
  - name: Chats
  - name: Copilot
  - name: CustomerData
  - name: Mcp
  - name: Media
  - name: Misc
  - name: PronunciationDictionaries
  - name: Providers
  - name: SipAliases
  - name: SipCredentials
  - name: SipPhoneNumbers
  - name: TextChat
  - name: TwilioProvider
  - name: Voice
  - name: WebhookTest
  - name: WebIntegrations
  - name: WebSocket
    description: WebSocket endpoints for real-time communication
paths:
  /api/v1/providers/twilio/{id}/phone-numbers/{phoneNumberId}:
    delete:
      tags:
        - TwilioProvider
      summary: Remove phone number
      description: >-
        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.
      parameters:
        - name: id
          in: path
          description: Provider identifier
          required: true
          schema:
            type: string
            format: uuid
        - name: phoneNumberId
          in: path
          description: Phone number identifier
          required: true
          schema:
            type: string
            format: uuid
        - name: force
          in: query
          description: Force removal even if phone number is used by agents
          schema:
            type: boolean
            default: false
      responses:
        '204':
          description: Phone number removed successfully
        '401':
          description: Authentication failed or API key is missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Access denied to the requested resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Provider or phone number not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '409':
          description: Phone number is used by agents (use force=true to override)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Server error occurred during removal
components:
  schemas:
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
  securitySchemes:
    ApiKey:
      type: http
      description: API Key Authentication (Bearer {key})
      scheme: Bearer
    OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://auth.dasha.ai/connect/authorize
          scopes:
            platform_api: Platform API

````