openapi: 3.1.0
info:
  title: IP Whitelist
  version: 1.0.0
  contact:
    name: Bandwidth
    url: https://support.bandwidth.com
    email: support@bandwidth.com
  termsOfService: https://www.bandwidth.com/legal/terms-of-use-bandwidthcom-web-sites/
  description: >-
    IP Whitelist provides endpoints for managing IP address whitelists for Voice
    services. The whitelist functionality allows customers to view and specify
    which IP addresses should be permitted for voice communication and E911
    emergency services.


    ## Base URL


    `https://api.bandwidth.com/v2`


    ## Authentication


    This API requires authentication via Basic or Bearer token authentication.


    ## Whitelist Operations


    The whitelist API supports adding IP addresses through separate voice and
    E911 whitelist structures. Voice whitelists contain IP addresses with
    service identifiers, while E911 whitelists contain IP addresses for
    emergency services.


    ### Validation Rules


    - **Maximum IP Addresses**: Up to 10 IP addresses per whitelist entry

    - **IP Format**: Valid IPv4 (no subnet masks)

    - **Operation**: Must be set to 'ADD'

    - **Whitelist Entries**: At least one voice whitelist or E911 whitelist
    entry must be provided

    - **Service Identifiers**: Voice whitelist entries must include
    `subAccountId` and `locationId` (both as strings)

    - **E911 Whitelists**: E911 whitelist entries contain only IP addresses for
    emergency services
servers:
  - url: https://api.bandwidth.com/v2
    description: Production
paths:
  /accounts/{accountId}/trunks/{trunkName}/ipAddresses:
    get:
      summary: Get Trunk IP Whitelist Addresses
      operationId: getTrunkWhitelists
      description: >-
        Retrieve all IP addresses currently whitelisted for a specific trunk's
        voice services and E911 emergency services configuration.


        This operation returns the complete whitelist configuration for the
        specified trunk, including voice whitelists organized by service
        identifiers and E911 whitelists for emergency services.


        ## Response Structure


        The response contains separate arrays for `voiceWhitelists` and
        `e911Whitelists` along with the trunk's `capabilityName`.
      parameters:
        - $ref: '#/components/parameters/accountId'
        - $ref: '#/components/parameters/trunkName'
        - $ref: '#/components/parameters/ipFilter'
        - $ref: '#/components/parameters/subAccountIdFilter'
        - $ref: '#/components/parameters/locationIdFilter'
      tags:
        - Whitelist
      responses:
        '200':
          $ref: '#/components/responses/getTrunkWhitelistResponse'
        '400':
          $ref: '#/components/responses/getWhitelistBadRequestError'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '404':
          $ref: '#/components/responses/notFoundError'
        '405':
          $ref: '#/components/responses/notAllowedError'
        '429':
          $ref: '#/components/responses/tooManyRequestsError'
        '500':
          $ref: '#/components/responses/internalServerError'
    patch:
      summary: Update Trunk IP Whitelist Addresses
      operationId: updateTrunkWhitelist
      description: >-
        Add IP addresses to a trunk's whitelist configuration for voice services
        and E911 emergency services. Contact support for assistance in removing
        IP addresses from your trunk's configuration.


        ## Operation: ADD

        This operation allows you to specify which IP addresses should be
        whitelisted for voice communications and E911 emergency services. The
        operation will merge the provided IP addresses with any existing
        whitelisted addresses.


        ## Whitelist Structure


        The request uses separate `voiceWhitelists` and `e911Whitelists` arrays.
        Voice whitelist entries must include `subAccountId` and `locationId` to
        identify the specific service configuration. E911 whitelist entries
        contain only IP addresses for emergency services.
      parameters:
        - $ref: '#/components/parameters/accountId'
        - $ref: '#/components/parameters/trunkName'
      tags:
        - Whitelist
      requestBody:
        $ref: '#/components/requestBodies/updateTrunkWhitelistRequestBody'
      responses:
        '200':
          $ref: '#/components/responses/updateTrunkWhitelistResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '404':
          $ref: '#/components/responses/notFoundError'
        '405':
          $ref: '#/components/responses/notAllowedError'
        '429':
          $ref: '#/components/responses/tooManyRequestsError'
        '500':
          $ref: '#/components/responses/internalServerError'
  /accounts/{accountId}/trunks:
    get:
      summary: Get All Trunks IP Whitelist Addresses
      operationId: getAllTrunksWhitelists
      description: >-
        Retrieve all IP addresses currently whitelisted for all trunks in an
        account's voice services and E911 emergency services configuration.


        This operation returns the complete whitelist configuration for all
        trunks, including voice whitelists organized by service identifiers and
        E911 whitelists for emergency services.


        ## Response Structure


        The response contains a `trunks` array where each trunk entry includes
        separate arrays for `voiceWhitelists` and `e911Whitelists` along with
        the trunk's name and `capabilityName`.
      parameters:
        - $ref: '#/components/parameters/accountId'
        - $ref: '#/components/parameters/capabilityNameFilter'
        - $ref: '#/components/parameters/ipFilter'
        - $ref: '#/components/parameters/subAccountIdFilter'
        - $ref: '#/components/parameters/locationIdFilter'
      tags:
        - Whitelist
      responses:
        '200':
          $ref: '#/components/responses/getAllTrunksWhitelistResponse'
        '400':
          $ref: '#/components/responses/getWhitelistBadRequestError'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '404':
          $ref: '#/components/responses/notFoundError'
        '405':
          $ref: '#/components/responses/notAllowedError'
        '429':
          $ref: '#/components/responses/tooManyRequestsError'
        '500':
          $ref: '#/components/responses/internalServerError'
components:
  schemas:
    voiceWhitelistEntry:
      title: Voice Whitelist Entry
      type: object
      description: >-
        A single voice whitelist entry containing IP addresses and service
        identifiers.
      properties:
        ipAddresses:
          type: array
          items:
            type: string
          description: >-
            List of IP addresses for this voice whitelist entry. Each IP address
            must be in valid IPv4 format.

            Maximum of 10 IP addresses per entry.
          maxItems: 10
          minItems: 1
          example:
            - 127.127.127.127
            - 127.127.127.128
        subAccountId:
          type: string
          description: >-
            Sub-account identifier for voice services. Required for voice
            whitelist entries.
          example: '10001'
        locationId:
          type: string
          description: >-
            Location identifier for voice services. Required for voice whitelist
            entries.
          example: '100001'
      required:
        - ipAddresses
        - subAccountId
        - locationId
    e911WhitelistEntry:
      title: E911 Whitelist Entry
      type: object
      description: >-
        A single E911 whitelist entry containing IP addresses for emergency
        services.
      properties:
        ipAddresses:
          type: array
          items:
            type: string
          description: >-
            List of IP addresses for E911 emergency services. Each IP address
            must be in valid IPv4 format.

            Maximum of 10 IP addresses per entry.
          maxItems: 10
          minItems: 1
          example:
            - 129.129.129.129
            - 130.130.130.130
      required:
        - ipAddresses
    trunkWhitelistRequest:
      title: Patch Trunk Whitelist Request
      type: object
      description: >-
        Request payload for updating IP address whitelist configuration for a
        trunk.
      properties:
        operation:
          type: string
          description: The type of operation to perform on the whitelist.
          enum:
            - ADD
          example: ADD
        voiceWhitelists:
          type: array
          items:
            $ref: '#/components/schemas/voiceWhitelistEntry'
          description: >-
            Array of voice whitelist entries. Each entry contains IP addresses
            and service identifiers.
          example:
            - ipAddresses:
                - 127.127.127.127
                - 127.127.127.128
              subAccountId: '10001'
              locationId: '100001'
            - ipAddresses:
                - 127.127.128.127
                - 127.127.128.128
              subAccountId: '20001'
              locationId: '200001'
        e911Whitelists:
          type: array
          items:
            $ref: '#/components/schemas/e911WhitelistEntry'
          description: Array of E911 whitelist entries for emergency services.
          example:
            - ipAddresses:
                - 129.129.129.129
                - 130.130.130.130
      required:
        - operation
    trunkWhitelistResponse:
      title: Patch Trunk Whitelist Response
      type: object
      description: >-
        Response payload containing the complete trunk whitelist configuration
        after the update operation.
      properties:
        operation:
          type: string
          description: The operation that was performed.
          example: ADD
        voiceWhitelists:
          type: array
          items:
            $ref: '#/components/schemas/voiceWhitelistEntry'
          description: >-
            Complete list of all voice whitelist entries after the update
            operation.
          example:
            - ipAddresses:
                - 127.127.127.126
                - 127.127.127.127
                - 127.127.127.128
              subAccountId: '10001'
              locationId: '100001'
            - ipAddresses:
                - 127.127.128.126
                - 127.127.128.127
                - 127.127.128.128
              subAccountId: '20001'
              locationId: '200001'
        e911Whitelists:
          type: array
          items:
            $ref: '#/components/schemas/e911WhitelistEntry'
          description: >-
            Complete list of all E911 whitelist entries after the update
            operation.
          example:
            - ipAddresses:
                - 126.126.126.126
                - 126.126.126.127
                - 126.126.126.128
                - 129.129.129.129
                - 130.130.130.130
      required:
        - operation
    getTrunkWhitelistResponse:
      title: Get Trunk Whitelist Response
      type: object
      description: >-
        Response payload containing current whitelist configuration for a
        specific trunk.
      properties:
        trunkId:
          type: string
          description: Unique identifier of the trunk.
          example: 6913a8f3c20f98441179e9b6
        capabilityName:
          type: string
          description: The capability name associated with the trunk.
          example: Default
        capabilityPipeId:
          type: string
          description: Unique identifier of the associated capability pipe.
          example: 33f0c519-ab66-4d1f-9e9f-525e3498a966
        appliesToOrigination:
          type: boolean
          description: Indicates whether the capability applies to origination.
          example: false
        appliesToTermination:
          type: boolean
          description: Indicates whether the capability applies to termination.
          example: true
        originationDefault:
          type: boolean
          description: Indicates whether this trunk is the default for origination.
          example: false
        voiceWhitelists:
          type: array
          items:
            $ref: '#/components/schemas/voiceWhitelistEntry'
          description: List of voice whitelist entries for the trunk.
          example:
            - ipAddresses:
                - 13.45.67.89
                - 12.12.122.2
                - 122.128.122.129
                - 121.126.121.123
                - 121.123.121.123
              subAccountId: '15143'
              locationId: '538528'
        e911Whitelists:
          type: array
          items:
            $ref: '#/components/schemas/e911WhitelistEntry'
          description: List of E911 whitelist entries for emergency services.
          example:
            - ipAddresses:
                - 121.123.121.123
      required:
        - trunkId
        - capabilityName
        - capabilityPipeId
        - appliesToOrigination
        - appliesToTermination
        - originationDefault
        - voiceWhitelists
        - e911Whitelists
    trunkEntry:
      title: Trunk Entry
      type: object
      description: A trunk entry containing whitelist configuration and trunk information.
      properties:
        trunkId:
          type: string
          description: Unique identifier of the trunk.
          example: 6913a8f3c20f98441179e9b6
        trunkName:
          type: string
          description: The name of the trunk.
          example: trunk1
        capabilityName:
          type: string
          description: The capability name associated with the trunk.
          example: Default
        capabilityPipeId:
          type: string
          description: Unique identifier of the associated capability pipe.
          example: 33f0c519-ab66-4d1f-9e9f-525e3498a966
        appliesToOrigination:
          type: boolean
          description: Indicates whether the capability applies to origination.
          example: false
        appliesToTermination:
          type: boolean
          description: Indicates whether the capability applies to termination.
          example: true
        originationDefault:
          type: boolean
          description: Indicates whether this trunk is the default for origination.
          example: false
        voiceWhitelists:
          type: array
          items:
            $ref: '#/components/schemas/voiceWhitelistEntry'
          description: List of voice whitelist entries for the trunk.
        e911Whitelists:
          type: array
          items:
            $ref: '#/components/schemas/e911WhitelistEntry'
          description: List of E911 whitelist entries for emergency services.
      required:
        - trunkId
        - trunkName
        - capabilityName
        - capabilityPipeId
        - appliesToOrigination
        - appliesToTermination
        - originationDefault
        - voiceWhitelists
        - e911Whitelists
    getAllTrunksWhitelistResponse:
      title: Get All Trunks Whitelist Response
      type: object
      description: Response payload containing whitelist configurations for all trunks.
      properties:
        trunks:
          type: array
          items:
            $ref: '#/components/schemas/trunkEntry'
          description: List of all trunk entries with their whitelist configurations.
          example:
            - trunkId: 6913a8f3c20f98441179e9b6
              trunkName: IPSharingtest
              capabilityName: Default
              capabilityPipeId: 33f0c519-ab66-4d1f-9e9f-525e3498a966
              appliesToOrigination: false
              appliesToTermination: true
              originationDefault: false
              voiceWhitelists:
                - ipAddresses:
                    - 13.45.67.89
                    - 12.12.122.2
                    - 122.128.122.129
                    - 121.126.121.123
                    - 121.123.121.123
                  subAccountId: '15143'
                  locationId: '538528'
              e911Whitelists:
                - ipAddresses:
                    - 121.123.121.123
      required:
        - trunks
    getTrunkWhitelistApiResponse:
      title: Get Trunk Whitelist API Response
      type: object
      description: Standard API response wrapper for GET trunk whitelist operations.
      properties:
        data:
          $ref: '#/components/schemas/getTrunkWhitelistResponse'
        links:
          type: array
          items:
            $ref: '#/components/schemas/link'
          description: Hypermedia links related to this resource.
        errors:
          type: array
          items:
            $ref: '#/components/schemas/error'
          description: List of errors encountered during the operation.
      required:
        - links
        - data
        - errors
    getAllTrunksWhitelistApiResponse:
      title: Get All Trunks Whitelist API Response
      type: object
      description: Standard API response wrapper for GET all trunks whitelist operations.
      properties:
        data:
          $ref: '#/components/schemas/getAllTrunksWhitelistResponse'
        links:
          type: array
          items:
            $ref: '#/components/schemas/link'
          description: Hypermedia links related to this resource.
        errors:
          type: array
          items:
            $ref: '#/components/schemas/error'
          description: List of errors encountered during the operation.
      required:
        - links
        - data
        - errors
    trunkWhitelistApiResponse:
      title: Patch Trunk Whitelist API Response
      type: object
      description: Standard API response wrapper for PATCH trunk whitelist operations.
      properties:
        data:
          $ref: '#/components/schemas/trunkWhitelistResponse'
        links:
          type: array
          items:
            $ref: '#/components/schemas/link'
          description: Hypermedia links related to this resource.
        errors:
          type: array
          items:
            $ref: '#/components/schemas/error'
          description: List of errors encountered during the operation.
      required:
        - links
        - data
        - errors
    genericError:
      title: Generic Error
      type: object
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/link'
          example: []
        data:
          type: object
          nullable: true
          example: null
        errors:
          type: array
          items:
            $ref: '#/components/schemas/error'
      required:
        - links
        - data
        - errors
    error:
      title: Error
      type: object
      properties:
        code:
          type: string
          description: Unique error code for this scenario.
          example: VCS-0001
        type:
          type: string
          description: Error type.
          example: WHITELIST_INVALID_REQUEST
        description:
          type: string
          description: Human-readable explanation of the problem.
          example: >-
            The whitelist request is invalid. Please check the request and try
            again.
      required:
        - description
        - code
        - type
    link:
      title: Link
      type: object
      properties:
        href:
          type: string
          description: URI of the link.
          example: https://api.bandwidth.com/v2/accounts/12345/whitelist
        rel:
          type: string
          description: Specifies the relationship between this link and the resource.
          example: self
        method:
          type: string
          description: HTTP method to be used.
          example: PATCH
  parameters:
    accountId:
      name: accountId
      in: path
      required: true
      description: The account ID for which to manage the whitelist configuration.
      schema:
        type: string
        example: '12345'
    trunkName:
      name: trunkName
      in: path
      required: true
      description: The trunk name for which to manage the whitelist configuration.
      schema:
        type: string
        example: trunk1
    capabilityNameFilter:
      name: capabilityNameFilter
      in: query
      required: false
      description: Filter results by specific capability name.
      schema:
        type: string
        example: Default
    ipFilter:
      name: ipFilter
      in: query
      required: false
      description: Filter whitelist entries by specific IP address.
      schema:
        type: string
        example: 127.127.127.127
    subAccountIdFilter:
      name: subAccountIdFilter
      in: query
      required: false
      description: Filter whitelist entries by specific sub-account ID.
      schema:
        type: string
        example: '10001'
    locationIdFilter:
      name: locationIdFilter
      in: query
      required: false
      description: Filter whitelist entries by specific location ID.
      schema:
        type: string
        example: '100001'
  requestBodies:
    updateTrunkWhitelistRequestBody:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/trunkWhitelistRequest'
          examples:
            trunkWhitelistExample:
              $ref: '#/components/examples/trunkWhitelistExample'
            voiceOnlyWhitelistExample:
              $ref: '#/components/examples/voiceOnlyWhitelistExample'
            e911OnlyWhitelistExample:
              $ref: '#/components/examples/e911OnlyWhitelistExample'
  responses:
    notFoundError:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          examples:
            notFoundErrorExample:
              $ref: '#/components/examples/notFoundErrorExample'
    getTrunkWhitelistResponse:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/getTrunkWhitelistApiResponse'
          examples:
            successfulGetTrunkWhitelistResponse:
              $ref: '#/components/examples/successfulGetTrunkWhitelistResponseExample'
    getAllTrunksWhitelistResponse:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/getAllTrunksWhitelistApiResponse'
          examples:
            successfulGetAllTrunksWhitelistResponse:
              $ref: >-
                #/components/examples/successfulGetAllTrunksWhitelistResponseExample
    updateTrunkWhitelistResponse:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/trunkWhitelistApiResponse'
          examples:
            successfulTrunkWhitelistResponse:
              $ref: '#/components/examples/successfulTrunkWhitelistResponseExample'
    getWhitelistBadRequestError:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          examples:
            accountIdNotFoundExample:
              $ref: '#/components/examples/accountIdNotFoundErrorExample'
    badRequestError:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          examples:
            maxIpExceededExample:
              $ref: '#/components/examples/maxIpExceededErrorExample'
            invalidOperationKeyExample:
              $ref: '#/components/examples/invalidOperationKeyExample'
            gatewayIpsNotFoundExample:
              $ref: '#/components/examples/gatewayIpsNotFoundErrorExample'
            trunkGroupConfigNotFoundExample:
              $ref: '#/components/examples/trunkGroupConfigNotFoundErrorExample'
    unauthorizedError:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          examples:
            unauthorizedErrorExample:
              $ref: '#/components/examples/unauthorizedErrorExample'
    forbiddenError:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          examples:
            forbiddenErrorExample:
              $ref: '#/components/examples/forbiddenErrorExample'
    notAllowedError:
      description: Method Not Allowed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          examples:
            notAllowedErrorExample:
              $ref: '#/components/examples/notAllowedErrorExample'
    tooManyRequestsError:
      description: Too Many Requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          examples:
            tooManyRequestsErrorExample:
              $ref: '#/components/examples/tooManyRequestsErrorExample'
    internalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          examples:
            internalServerErrorExample:
              $ref: '#/components/examples/internalServerErrorExample'
            processingErrorExample:
              $ref: '#/components/examples/processingErrorExample'
  examples:
    notFoundErrorExample:
      summary: Resource not found
      value:
        data: null
        links: []
        errors:
          - code: VCS-0005
            type: RESOURCE_NOT_FOUND
            description: Resource not found
    trunkWhitelistExample:
      summary: Add IP addresses with voice and E911 whitelists
      value:
        operation: ADD
        voiceWhitelists:
          - ipAddresses:
              - 127.127.127.127
              - 127.127.127.128
            subAccountId: '10001'
            locationId: '100001'
          - ipAddresses:
              - 127.127.128.127
              - 127.127.128.128
            subAccountId: '20001'
            locationId: '200001'
        e911Whitelists:
          - ipAddresses:
              - 129.129.129.129
              - 130.130.130.130
    voiceOnlyWhitelistExample:
      summary: Add IP addresses for voice services only
      value:
        operation: ADD
        voiceWhitelists:
          - ipAddresses:
              - 127.127.127.127
              - 127.127.127.128
            subAccountId: '10001'
            locationId: '100001'
          - ipAddresses:
              - 128.128.128.128
              - 128.128.128.129
            subAccountId: '20002'
            locationId: '200002'
    e911OnlyWhitelistExample:
      summary: Add IP addresses for E911 emergency services only
      value:
        operation: ADD
        e911Whitelists:
          - ipAddresses:
              - 129.129.129.129
              - 130.130.130.130
    successfulTrunkWhitelistResponseExample:
      summary: Successful trunk whitelist update
      value:
        data:
          operation: ADD
          voiceWhitelists:
            - ipAddresses:
                - 127.127.127.126
                - 127.127.127.127
                - 127.127.127.128
              subAccountId: '10001'
              locationId: '100001'
            - ipAddresses:
                - 127.127.128.126
                - 127.127.128.127
                - 127.127.128.128
              subAccountId: '20001'
              locationId: '200001'
          e911Whitelists:
            - ipAddresses:
                - 126.126.126.126
                - 126.126.126.127
                - 126.126.126.128
                - 129.129.129.129
                - 130.130.130.130
        links:
          - href: >-
              https://api.bandwidth.com/v2/accounts/12345/trunks/trunk1/ipAddresses
            rel: self
            method: PATCH
        errors: []
    successfulGetTrunkWhitelistResponseExample:
      summary: Successful trunk whitelist retrieval
      value:
        data:
          trunkId: 6913a8f3c20f98441179e9b6
          capabilityName: Default
          capabilityPipeId: 33f0c519-ab66-4d1f-9e9f-525e3498a966
          appliesToOrigination: false
          appliesToTermination: true
          originationDefault: false
          voiceWhitelists:
            - ipAddresses:
                - 13.45.67.89
                - 12.12.122.2
                - 122.128.122.129
                - 121.126.121.123
                - 121.123.121.123
              subAccountId: '15143'
              locationId: '538528'
          e911Whitelists:
            - ipAddresses:
                - 121.123.121.123
        links:
          - href: >-
              https://api.bandwidth.com/v2/accounts/12345/trunks/trunk1/ipAddresses
            rel: self
            method: GET
        errors: []
    successfulGetAllTrunksWhitelistResponseExample:
      summary: Successful all trunks whitelist retrieval
      value:
        data:
          trunks:
            - trunkId: 6913a8f3c20f98441179e9b6
              trunkName: IPSharingtest
              capabilityName: Default
              capabilityPipeId: 33f0c519-ab66-4d1f-9e9f-525e3498a966
              appliesToOrigination: false
              appliesToTermination: true
              originationDefault: false
              voiceWhitelists:
                - ipAddresses:
                    - 13.45.67.89
                    - 12.12.122.2
                    - 122.128.122.129
                    - 121.126.121.123
                    - 121.123.121.123
                  subAccountId: '15143'
                  locationId: '538528'
              e911Whitelists:
                - ipAddresses:
                    - 121.123.121.123
        links:
          - href: https://api.bandwidth.com/v2/accounts/12345/trunks
            rel: self
            method: GET
        errors: []
    accountIdNotFoundErrorExample:
      summary: Account ID not found
      value:
        data: null
        links: []
        errors:
          - code: VCS-0205
            type: RESOURCE_NOT_FOUND
            description: AccountId=123456 does not exist or is locked.
    maxIpExceededErrorExample:
      summary: Maximum IP addresses limit exceeded
      value:
        data: null
        links: []
        errors:
          - code: VCS-0192
            type: VALIDATION
            description: >-
              Whitelist IPs cannot exceed the maximum limit of 10. Please
              provide a valid list of IPs.
    invalidOperationKeyExample:
      summary: Invalid operation key provided
      value:
        data: null
        links: []
        errors:
          - code: VCS-0199
            type: VALIDATION
            description: >-
              The operation key provided is invalid. Please provide a valid
              operation key.
    gatewayIpsNotFoundErrorExample:
      summary: Gateway IPs not found for account
      value:
        data: null
        links: []
        errors:
          - code: VCS-0197
            type: RESOURCE_NOT_FOUND
            description: >-
              Gateway IPs cannot be found for accoundId=12345,
              subAccountid=67890, locationId=12345. Please check the request and
              try again.
    trunkGroupConfigNotFoundErrorExample:
      summary: Trunk group configuration not found
      value:
        data: null
        links: []
        errors:
          - code: VCS-0198
            type: RESOURCE_NOT_FOUND
            description: >-
              A valid trunk group configuration cannot be found for
              accountId=12345.
    unauthorizedErrorExample:
      summary: Authentication credentials missing or invalid
      value:
        data: null
        links: []
        errors:
          - code: VCS-0004
            type: AUTHORIZATION
            description: Unauthorized
    forbiddenErrorExample:
      summary: Insufficient permissions for whitelist operations
      value:
        data: null
        links: []
        errors:
          - code: VCS-0132
            type: AUTHORIZATION
            description: Forbidden
    notAllowedErrorExample:
      summary: HTTP method not allowed
      value:
        data: null
        links: []
        errors:
          - code: VCS-0134
            type: VALIDATION
            description: Request method 'POST' is not supported.
    tooManyRequestsErrorExample:
      summary: Rate limit exceeded
      value:
        data: null
        links: []
        errors:
          - code: VCS-0098
            description: >-
              Your account has made too many requests to this endpoint. Wait
              until 2025-01-01T00:00:00Z.
            type: RATE_LIMITED
    processingErrorExample:
      summary: Internal processing error
      value:
        data: null
        links: []
        errors:
          - code: VCS-0202
            type: UNKNOWN
            description: >-
              There was an error processing the whitelist request. If this issue
              persists, please contact Bandwidth support.
    internalServerErrorExample:
      summary: Unexpected internal server error
      value:
        data: null
        links: []
        errors:
          - code: VCS-0001
            type: UNKNOWN
            description: >-
              There was an unknown error performing the request. If this issue
              persists, please contact Bandwidth support.
  securitySchemes:
    Basic:
      type: http
      scheme: basic
      description: >-
        Basic authentication is a simple authentication scheme built into the
        HTTP protocol. To use it, send your HTTP requests with an
        `Authorization` header that contains the word `Basic` followed by a
        space and a Base64-encoded string `username:password`.


        - Example: `Authorization: Basic ZGVtbZpwQDU1dzByZA==`
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer authentication (also called token authentication) is an HTTP
        authentication scheme that involves security tokens called bearer
        tokens. The name "Bearer authentication" can be understood as "give
        access to the bearer of this token." The client must send this token in
        the `Authorization` header when making requests to protected resources.


        - Example: `Authorization: Bearer <token>`


        Where `<token>` should be replaced with the token string without angle
        brackets.


        For more information, see the following guide:
        [Credentials](https://dev.bandwidth.com/docs/account/credentials/management)
security:
  - Basic: []
  - Bearer: []
tags:
  - name: Whitelist
    description: Operations for managing IP address whitelists for voice services.
