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

> Returns a list of agents that use phone numbers associated with this SIP credential,
grouped by phone number. Also includes the count of calls currently in queue that
use these credentials.

## Response Information

This endpoint returns:

* **Agents grouped by phone number**: Shows which agents use each phone number for inbound/outbound calls
* **Queued calls count**: Number of calls currently in queue that use phone numbers with these credentials

## Relationship Hierarchy

SIP credentials are used through this hierarchy:

1. **SIP Credentials** → authenticate with SIP trunk provider
2. **Phone Numbers** → use credentials to enable calling
3. **Agents** → use phone numbers for inbound/outbound calls

## Use Cases

* **Before updating credentials**: Check which agents and queued calls will be affected
* **Before deleting credentials**: Understand the full impact on agents and active operations
* **Troubleshooting**: Identify all resources using a specific SIP provider


## OpenAPI

````yaml https://blackbox.dasha.ai/swagger/v1/swagger.json get /api/v1/sip-credentials/{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: 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/sip-credentials/{id}/affected-agents:
    get:
      tags:
        - SipCredentials
      summary: Get agents using SIP credential
      description: >-
        Returns a list of agents that use phone numbers associated with this SIP
        credential,

        grouped by phone number. Also includes the count of calls currently in
        queue that

        use these credentials.
      parameters:
        - name: id
          in: path
          description: Credential identifier
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Returns affected agents and queued calls count successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CredentialsAffectedAgents'
        '401':
          description: Authentication failed or API key is missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: SIP credential 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:
    CredentialsAffectedAgents:
      required:
        - affectedCallsCount
        - phoneNumbers
      type: object
      properties:
        phoneNumbers:
          type: array
          items:
            $ref: '#/components/schemas/PhoneAffectedAgents'
          description: >-
            Phone numbers configured to use these SIP credentials, along with
            the agents using each number. Changes to the credentials will affect
            all calls made through these phone numbers and their associated
            agents.
        affectedCallsCount:
          type: integer
          description: >-
            Number of scheduled calls that explicitly reference these
            credentials via OverrideOutboundConfig. These calls have overridden
            their agent's default SIP configuration to use these specific
            credentials.
          format: int32
      additionalProperties: false
      description: >-
        Impact analysis showing which agents and scheduled calls will be
        affected by changes to SIP credentials. Organized by phone numbers that
        use these credentials, helping you understand the scope of impact before
        modifying or deleting trunk configuration.
    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: {}
    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.
    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

````