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

# Get agents using phone number

> Returns a list of agents that use this SIP phone number. Phone numbers can be used for
both inbound call routing (linked agent) and outbound calls (agents configured to use
this number for making calls).

## Usage Types

Phone numbers can be used by agents in two ways:

**Inbound (Linked Agent):**

* One agent can be linked to receive inbound calls on this number
* Incoming calls are automatically routed to the linked agent

**Outbound:**

* Multiple agents can use this number for making outbound calls
* The number appears as caller ID when agents make calls

This endpoint returns all agents using the phone number for either inbound or outbound purposes.


## OpenAPI

````yaml https://blackbox.dasha.ai/swagger/v1/swagger.json get /api/v1/sip-phone-numbers/{id}/affected-agents
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: 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/sip-phone-numbers/{id}/affected-agents:
    get:
      tags:
        - SipPhoneNumbers
      summary: Get agents using phone number
      description: >-
        Returns a list of agents that use this SIP phone number. Phone numbers
        can be used for

        both inbound call routing (linked agent) and outbound calls (agents
        configured to use

        this number for making calls).
      parameters:
        - name: id
          in: path
          description: Phone number identifier
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Returns affected agents successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneAffectedAgents'
        '401':
          description: Authentication failed or API key is missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Phone number with specified ID does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Server error occurred while retrieving affected agents
components:
  schemas:
    PhoneAffectedAgents:
      required:
        - affectedAgents
        - id
        - phoneNumber
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the phone number configuration.
          format: uuid
        phoneNumber:
          minLength: 1
          type: string
          description: >-
            Phone number that agents are using. Changes to this number's
            configuration will affect all listed agents.
        affectedAgents:
          type: array
          items:
            $ref: '#/components/schemas/AffectedAgentItem'
          description: >-
            Agents using this phone number for inbound or outbound calls. Each
            agent entry indicates how they use the number (inbound routing,
            outbound calling, or both).
      additionalProperties: false
      description: >-
        Phone number and its associated agents that will be impacted by SIP
        configuration changes. Shows which agents use this phone number for
        inbound or outbound calls, helping you assess the impact before making
        changes.
    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: {}
    AffectedAgentItem:
      required:
        - agentId
        - agentName
        - uses
      type: object
      properties:
        agentId:
          minLength: 1
          type: string
          description: Unique identifier of the affected agent.
        agentName:
          minLength: 1
          type: string
          description: >-
            Display name of the affected agent. Helps identify which agent
            configurations will be impacted.
        uses:
          type: array
          items:
            $ref: '#/components/schemas/SipUsageType'
          description: >-
            How this agent uses the SIP configuration. Possible values include
            "inbound" (receives calls on this number), "outbound" (makes calls
            using this configuration), or both. Understanding usage helps assess
            the impact of changes.
      additionalProperties: false
      description: >-
        Agent that will be affected by SIP configuration changes, including how
        the agent uses the configuration. Provides visibility into whether the
        agent uses the SIP settings for receiving inbound calls, making outbound
        calls, or both.
    SipUsageType:
      enum:
        - inbound
        - outbound
      type: string
      description: >-
        How an agent uses a SIP configuration, indicating whether the
        configuration is for receiving inbound calls, making outbound calls, or
        both. Helps understand the impact of SIP configuration changes on agent
        functionality.
  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

````