openapi: 3.1.0
info:
  title: Phone Numbers - Voice
  summary: View and bulk provision voice features on phone numbers.
  description: View and bulk provision voice features on phone numbers.
  contact:
    name: Bandwidth
    url: https://support.bandwidth.com
    email: support@bandwidth.com
  termsOfService: https://www.bandwidth.com/legal/terms-of-use-bandwidthcom-web-sites/
  version: 1.0.0
servers:
  - url: https://api.bandwidth.com
    description: Production
tags:
  - name: Voice Phone Numbers
    description: >-
      View and search phone number(s) and the current state of their provisioned
      voice features.
  - name: Bulk Voice Phone Number Provisioning
    description: Create and view the current status of async bulk provisioning actions.
security:
  - Basic: []
  - Bearer: []
paths:
  /v2/accounts/{accountId}/phoneNumbers/voice:
    parameters:
      - $ref: '#/components/parameters/accountId'
    get:
      summary: List Phone Numbers with Voice Features
      description: >-
        Returns the current state of voice features and settings provisioned for
        a paged set of phone numbers.
      operationId: listVoiceCapablePhoneNumbers
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/afterCursor'
        - $ref: '#/components/parameters/voiceConfigurationPackageId'
      responses:
        '200':
          $ref: >-
            #/components/responses/listPhoneNumberVoiceProvisioningDetailsResponse
        '400':
          $ref: '#/components/responses/voicePhoneNumbersBadRequestErrorResponse'
        '401':
          $ref: '#/components/responses/voicePhoneNumbersUnauthorizedErrorResponse'
        '403':
          $ref: '#/components/responses/voicePhoneNumbersForbiddenErrorResponse'
        '404':
          $ref: '#/components/responses/voicePhoneNumbersNotFoundErrorResponse'
        '405':
          $ref: >-
            #/components/responses/voicePhoneNumbersMethodNotAllowedErrorResponse
        '409':
          $ref: '#/components/responses/voicePhoneNumbersConflictErrorResponse'
        '429':
          $ref: '#/components/responses/voicePhoneNumbersTooManyRequestsErrorResponse'
        5XX:
          $ref: '#/components/responses/voicePhoneNumbersInternalServerErrorResponse'
      tags:
        - Voice Phone Numbers
    patch:
      summary: Update Phone Numbers
      description: Add, remove, or update multiple TN overrides at once.
      operationId: patchVoiceCapablePhoneNumbers
      requestBody:
        $ref: '#/components/requestBodies/updateVoicePhoneNumbersRequest'
      responses:
        '200':
          $ref: '#/components/responses/updatePhoneNumberResponse'
        '400':
          $ref: '#/components/responses/voicePhoneNumbersBadRequestErrorResponse'
        '401':
          $ref: '#/components/responses/voicePhoneNumbersUnauthorizedErrorResponse'
        '403':
          $ref: '#/components/responses/voicePhoneNumbersForbiddenErrorResponse'
        '404':
          $ref: '#/components/responses/voicePhoneNumbersNotFoundErrorResponse'
        '405':
          $ref: >-
            #/components/responses/voicePhoneNumbersMethodNotAllowedErrorResponse
        '409':
          $ref: '#/components/responses/voicePhoneNumbersConflictErrorResponse'
        '429':
          $ref: '#/components/responses/voicePhoneNumbersTooManyRequestsErrorResponse'
        5XX:
          $ref: '#/components/responses/voicePhoneNumbersInternalServerErrorResponse'
      tags:
        - Voice Phone Numbers
  /v2/accounts/{accountId}/phoneNumbers/voice/search:
    parameters:
      - $ref: '#/components/parameters/accountId'
    post:
      summary: Search Phone Numbers
      description: >-
        Search and filter phone numbers by the phone numbers themselves or the
        current state of their provisioned voice features and settings. Returns
        the current state of voice features and settings provisioned for a paged
        set of phone numbers.
      operationId: searchVoicePhoneNumbers
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/afterCursor'
      requestBody:
        $ref: '#/components/requestBodies/searchVoicePhoneNumbersRequest'
      responses:
        '200':
          $ref: '#/components/responses/searchVoicePhoneNumbersResponse'
        '400':
          $ref: '#/components/responses/voicePhoneNumbersBadRequestErrorResponse'
        '401':
          $ref: '#/components/responses/voicePhoneNumbersUnauthorizedErrorResponse'
        '403':
          $ref: '#/components/responses/voicePhoneNumbersForbiddenErrorResponse'
        '404':
          $ref: '#/components/responses/voicePhoneNumbersNotFoundErrorResponse'
        '405':
          $ref: >-
            #/components/responses/voicePhoneNumbersMethodNotAllowedErrorResponse
        '409':
          $ref: '#/components/responses/voicePhoneNumbersConflictErrorResponse'
        '429':
          $ref: '#/components/responses/voicePhoneNumbersTooManyRequestsErrorResponse'
        5XX:
          $ref: '#/components/responses/voicePhoneNumbersInternalServerErrorResponse'
      tags:
        - Voice Phone Numbers
  /v2/accounts/{accountId}/phoneNumbers/{phoneNumber}/voice:
    parameters:
      - $ref: '#/components/parameters/accountId'
      - $ref: '#/components/parameters/phoneNumber'
    get:
      summary: Get Phone Number with Voice Features
      description: >-
        Returns the current state of voice features and settings provisioned for
        a phone number.
      operationId: getPhoneNumberDetails
      responses:
        '200':
          $ref: >-
            #/components/responses/getPhoneNumberVoiceProvisioningDetailsResponse
        '400':
          $ref: '#/components/responses/voicePhoneNumbersBadRequestErrorResponse'
        '401':
          $ref: '#/components/responses/voicePhoneNumbersUnauthorizedErrorResponse'
        '403':
          $ref: '#/components/responses/voicePhoneNumbersForbiddenErrorResponse'
        '404':
          $ref: '#/components/responses/voicePhoneNumbersNotFoundErrorResponse'
        '405':
          $ref: >-
            #/components/responses/voicePhoneNumbersMethodNotAllowedErrorResponse
        '409':
          $ref: '#/components/responses/voicePhoneNumbersConflictErrorResponse'
        '429':
          $ref: '#/components/responses/voicePhoneNumbersTooManyRequestsErrorResponse'
        5XX:
          $ref: '#/components/responses/voicePhoneNumbersInternalServerErrorResponse'
      tags:
        - Voice Phone Numbers
  /v2/accounts/{accountId}/phoneNumbers/voice/bulk:
    parameters:
      - $ref: '#/components/parameters/accountId'
    post:
      summary: Bulk provision voice phone numbers
      operationId: bulkProvisionVoicePhoneNumbers
      description: >-
        Create request for a bulk provisioning action to be performed on voice
        phone numbers. Requests that cannot be completed immediately will be
        processed asynchronously and a reference ID will be returned to check
        the status of the request at any time.
      requestBody:
        $ref: '#/components/requestBodies/voiceBulkPhoneNumbersRequest'
      responses:
        '202':
          $ref: '#/components/responses/bulkVoicePhoneNumbersAcceptedResponse'
        '400':
          $ref: '#/components/responses/voicePhoneNumbersBadRequestErrorResponse'
        '401':
          $ref: '#/components/responses/voicePhoneNumbersUnauthorizedErrorResponse'
        '403':
          $ref: '#/components/responses/voicePhoneNumbersForbiddenErrorResponse'
        '404':
          $ref: '#/components/responses/voicePhoneNumbersNotFoundErrorResponse'
        '405':
          $ref: >-
            #/components/responses/voicePhoneNumbersMethodNotAllowedErrorResponse
        '409':
          $ref: '#/components/responses/voicePhoneNumbersConflictErrorResponse'
        '429':
          $ref: '#/components/responses/voicePhoneNumbersTooManyRequestsErrorResponse'
        5XX:
          $ref: '#/components/responses/voicePhoneNumbersInternalServerErrorResponse'
      tags:
        - Bulk Voice Phone Number Provisioning
  /v2/accounts/{accountId}/phoneNumbers/voice/bulk/{bulkId}:
    parameters:
      - $ref: '#/components/parameters/accountId'
      - $ref: '#/components/parameters/bulkId'
    get:
      summary: Get bulk provision request details and current status.
      operationId: getBulkVoicePhoneNumbers
      description: >-
        Get details of an async bulk provisioning action performed on voice
        phone numbers.
      responses:
        '200':
          $ref: '#/components/responses/bulkVoicePhoneNumbersResponse'
        '400':
          $ref: '#/components/responses/voicePhoneNumbersBadRequestErrorResponse'
        '401':
          $ref: '#/components/responses/voicePhoneNumbersUnauthorizedErrorResponse'
        '403':
          $ref: '#/components/responses/voicePhoneNumbersForbiddenErrorResponse'
        '404':
          $ref: '#/components/responses/voicePhoneNumbersNotFoundErrorResponse'
        '405':
          $ref: >-
            #/components/responses/voicePhoneNumbersMethodNotAllowedErrorResponse
        '409':
          $ref: '#/components/responses/voicePhoneNumbersConflictErrorResponse'
        '429':
          $ref: '#/components/responses/voicePhoneNumbersTooManyRequestsErrorResponse'
        5XX:
          $ref: '#/components/responses/voicePhoneNumbersInternalServerErrorResponse'
      tags:
        - Bulk Voice Phone Number Provisioning
components:
  schemas:
    accountId:
      type: integer
      format: int32
      description: Account ID (san).
      example: 1234567
    afterCursor:
      type: string
      description: >-
        Pointer to the first record of the next page in a paged result set.
        Valid values are generated server-side and provided in "next" page links
        when a next page exists. When omitted the first page is returned.
      example: Q29uZ3JhdHVsYXRpb25zLCB5b3UgZm91bmQgdGhlIE9uZSBQaWVjZSA6KQo=
    bulkId:
      type: string
      format: uuid
      description: >-
        UUID associated with async task for bulk provisioning voice phone
        numbers.
      example: 3bc3c038-8f8c-4489-8dd2-c14063f395e2
    bulkProvisioningActionEnum:
      type: string
      description: The action for bulk provisioning phone numbers.
      enum:
        - ADD_INTEGRATION
        - REMOVE_INTEGRATION
        - TRANSFER_INTEGRATION
      example: ADD_INTEGRATION
    bulkProvisioningErrorCode:
      type: string
      description: The error code associated with a bulk provisioning action.
      nullable: true
      example: VCS-1000
    bulkProvisioningErrorDescription:
      type: string
      description: The description of the error associated with a bulk provisioning action.
      nullable: true
      example: >-
        Description of an error that occurred during the async bulk provisioning
        process.
    bulkProvisioningPhoneNumberStatusEnum:
      type: string
      description: The status of a requested bulk provisioning action for a phone number.
      enum:
        - ACCEPTED
        - IN_PROGRESS
        - SUCCESS
        - CANCELED
        - ERROR
      example: IN_PROGRESS
    bulkProvisioningStatusEnum:
      type: string
      description: >-
        A cumulative status for all phone numbers provided in an async bulk
        provisioning request.
      enum:
        - ACCEPTED
        - IN_PROGRESS
        - COMPLETE_SUCCESS
        - COMPLETE_ERROR
        - PARTIAL_SUCCESS
        - CANCELED
      example: COMPLETE_SUCCESS
    bulkProvisioningStatusUpdated:
      type: string
      format: date-time
      description: >-
        The UTC date and time the status of a bulk provisioning action was last
        updated.
      example: '2025-01-01T00:00:00Z'
    cnamEnabled:
      type: boolean
      description: The current state of CNAM (Calling Name) settings.
      example: true
    href:
      type: string
      description: The URL of the linked document.
      example: >-
        https://api.bandwidth.com/v2/accounts/1234567/phoneNumbers/voice?limit=17
    integrationType:
      type: string
      description: The integration type associated with the phone number.
      example: zoom_cc_us
    inboundActivated:
      type: boolean
      description: Current state of inbound voice activation for the phone number.
      example: false
    limit:
      type: integer
      description: The number of records to return in a single page.
      format: int32
      default: 1000
      minimum: 1
      maximum: 5000
      example: 100
    method:
      type: string
      description: The HTTP method to use when making a request to the provided link.
      enum:
        - GET
        - POST
        - PUT
        - PATCH
        - DELETE
      example: GET
    operator:
      type: string
      description: The operator to use for a filter.
      enum:
        - EQ
      example: EQ
    outboundNationalActivated:
      type: boolean
      description: >-
        Current state of outbound national voice activation for the phone
        number.
      example: true
    outboundInternationalActivated:
      type: boolean
      description: >-
        Current state of outbound international voice activation for the phone
        number.
      example: true
    parameter:
      type: string
      description: Field name to filter on.
      example: phoneNumber
    phoneNumber:
      type: string
      description: An E164 formatted phone number.
      example: '+19191234567'
    queryCriteriaValues:
      type: array
      description: The parameter value(s) for filtering.
      items:
        type: string
        description: The parameter value for filtering.
        example: '+19191234567'
    rel:
      type: string
      description: The relationship between the linked document and the current document.
      example: next
    voiceConfigurationPackageId:
      description: A unique identifier referencing a voice configuration package.
      type: string
      format: uuid
      example: 3bc3c038-8f8c-4489-8dd2-c14063f395e2
    voiceConfigurationPackageIdQueryParameter:
      type: string
      format: uuid
      description: >-
        Filter phone numbers by their assigned voice configuration package. When
        the string value 'null' is provided the result set returned will be a
        filtered list of phone numbers missing a voice configuration package.
      examples:
        - ID Filter:
            description: A unique identifier referencing a voice configuration package.
            value: 3bc3c038-8f8c-4489-8dd2-c14063f395e2
        - Null Filter:
            description: >-
              Filter value to get result set of phone numbers not assigned a
              voice configuration package.
            value: 'null'
    voiceConfigurationPackageName:
      type: string
      description: The voice configuration package's name.
      example: Creative Voice Configuration Package Name
      minLength: 1
      maxLength: 128
    voiceConfigurationPackageDescription:
      type: string
      description: A description of the voice configuration package.
      example: Even more creative Voice Configuration Package description!
      maxLength: 1024
    voiceConfigurationPackageHttpVoiceV2ApplicationId:
      type: string
      format: uuid
      description: A unique identifier referencing an HTTP Voice V2 Application.
      example: 3bc3c038-8f8c-4489-8dd2-c14063f395e2
    voiceIntegrationId:
      type: string
      format: uuid
      description: A unique identifier referencing a voice integration.
      example: 3bc3c038-8f8c-4489-8dd2-c14063f395e2
    voicePhoneNumberUpdateList:
      description: The phone number and override object.
      type: array
      items:
        properties:
          phoneNumber:
            $ref: '#/components/schemas/phoneNumber'
          override:
            $ref: '#/components/schemas/override'
    integrations:
      type: object
      nullable: true
      description: Voice integration provisioning details.
      properties:
        currentVoiceIntegrationId:
          $ref: '#/components/schemas/voiceIntegrationId'
        voiceIntegrationType:
          $ref: '#/components/schemas/integrationType'
        tasks:
          $ref: '#/components/schemas/tasks'
    override:
      type: object
      nullable: true
      description: TN override details.
      properties:
        originationRoutePlan:
          $ref: >-
            #/components/schemas/voiceConfigurationPackageOriginationRoutePlanRequest
    originationRoutePlanRoute:
      type: object
      description: A route for an Origination Route Plan.
      properties:
        priority:
          type: number
          minimum: 1
          maximum: 10
          example: 1
        name:
          type: string
          example: route 1
        endpoints:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/tnEndpointWithoutTrunk'
              - $ref: '#/components/schemas/sipEndpointWithoutTrunk'
              - $ref: '#/components/schemas/ipv4EndpointWithoutTrunk'
              - $ref: '#/components/schemas/integrationEndpointWithoutTrunk'
              - $ref: '#/components/schemas/fqdnEndpointWithoutTrunk'
              - $ref: '#/components/schemas/botEndpoint'
    tnEndpointWithoutTrunk:
      type: object
      description: TN endpoint for Origination Route Plan.
      properties:
        endpoint:
          type: string
        type:
          type: string
          enum:
            - TN
        weight:
          type: integer
          format: int32
    sipEndpointWithoutTrunk:
      type: object
      description: SIP endpoint for Origination Route Plan.
      properties:
        endpoint:
          type: string
        type:
          type: string
          enum:
            - SIP
        weight:
          type: integer
          format: int32
    ipv4EndpointWithoutTrunk:
      type: object
      description: IPv4 endpoint for Origination Route Plan.
      properties:
        endpoint:
          type: string
        type:
          type: string
          enum:
            - IP_V4
        weight:
          type: integer
          format: int32
        rewriteUser:
          type: string
          description: >-
            Overrides the user part of the SIP Request-URI (e.g.
            `rewrite-user@endpoint`).
          example: rewrite-user@example.com
    integrationEndpointWithoutTrunk:
      type: object
      description: Integration endpoint for Origination Route Plan.
      properties:
        endpoint:
          type: string
        type:
          type: string
          enum:
            - INTEGRATION
        weight:
          type: integer
          format: int32
        rewriteUser:
          type: string
          description: >-
            Overrides the user part of the SIP Request-URI (e.g.
            `rewrite-user@endpoint`).
          example: rewrite-user@example.com
    fqdnEndpointWithoutTrunk:
      type: object
      description: FQDN endpoint for Origination Route Plan.
      properties:
        endpoint:
          type: string
        type:
          type: string
          enum:
            - FQDN
        weight:
          type: integer
          format: int32
        rewriteUser:
          type: string
          description: >-
            Overrides the user part of the SIP Request-URI (e.g.
            `rewrite-user@endpoint`).
          example: rewrite-user@example.com
    botEndpoint:
      type: object
      description: Bot endpoint for Origination Route Plan.
      properties:
        endpoint:
          type: string
        type:
          type: string
          enum:
            - BOT
        weight:
          type: integer
          format: int32
    queryCriteria:
      description: Field, operator, and values to apply to a search query.
      properties:
        parameter:
          $ref: '#/components/schemas/parameter'
        operator:
          $ref: '#/components/schemas/operator'
        values:
          $ref: '#/components/schemas/queryCriteriaValues'
    phoneNumberCount:
      type: integer
      description: >-
        The number of phone numbers associated with the voice configuration
        package.
      example: 10
    voiceConfigurationPackageCallVerification:
      type: object
      description: >-
        Call Verification settings associated with the voice configuration
        package.
      properties:
        enabled:
          type: boolean
          example: true
    voiceConfigurationPackageCnam:
      type: object
      description: Calling Name (CNAM) settings.
      properties:
        enabled:
          $ref: '#/components/schemas/cnamEnabled'
    voiceConfigurationPackageOriginationRoutePlanRequest:
      type: object
      description: Object for creating new routes.
      properties:
        routes:
          type: array
          items:
            $ref: '#/components/schemas/originationRoutePlanRoute'
    voiceConfigurationPackageOriginationRoutePlan:
      type: object
      description: Origination route plan associated with a voice configuration package.
      properties:
        routePlanId:
          type: string
          format: uuid
          example: 3bc3c038-8f8c-4489-8dd2-c14063f395e2
        routes:
          type: array
          items:
            $ref: '#/components/schemas/originationRoutePlanRoute'
    voiceConfigurationPackagePindropIntegration:
      type: object
      description: >-
        Pindrop Integration settings associated with the voice configuration
        package.
      properties:
        enabled:
          type: boolean
          example: true
    voiceConfigurationPackageStirShakenBehavior:
      type: object
      description: Stir shaken behavior.
      properties:
        verstat:
          type: string
          example: BASIC
          enum:
            - NONE
            - BASIC
            - ENHANCED
        identity:
          type: boolean
          example: true
    voiceConfigurationPackage:
      type: object
      description: The response object representing a voice configuration package.
      nullable: true
      properties:
        voiceConfigurationPackageId:
          $ref: '#/components/schemas/voiceConfigurationPackageId'
        accountId:
          $ref: '#/components/schemas/accountId'
        name:
          $ref: '#/components/schemas/voiceConfigurationPackageName'
        description:
          $ref: '#/components/schemas/voiceConfigurationPackageDescription'
        cnam:
          $ref: '#/components/schemas/voiceConfigurationPackageCnam'
        originationRoutePlan:
          type: object
          description: >-
            Origination route plan associated with a voice configuration
            package.
          properties:
            routePlanId:
              type: string
              format: uuid
              example: 3bc3c038-8f8c-4489-8dd2-c14063f395e2
            routes:
              type: array
              items:
                $ref: '#/components/schemas/originationRoutePlanRoute'
        stirShakenBehavior:
          $ref: '#/components/schemas/voiceConfigurationPackageStirShakenBehavior'
        httpVoiceV2ApplicationId:
          $ref: >-
            #/components/schemas/voiceConfigurationPackageHttpVoiceV2ApplicationId
        pindropIntegration:
          $ref: '#/components/schemas/voiceConfigurationPackagePindropIntegration'
        callVerification:
          $ref: '#/components/schemas/voiceConfigurationPackageCallVerification'
        phoneNumberCount:
          $ref: '#/components/schemas/phoneNumberCount'
    tasks:
      type: array
      description: Async bulk provisioning task details.
      items:
        type: object
        properties:
          bulkId:
            $ref: '#/components/schemas/bulkId'
          voiceIntegrationId:
            $ref: '#/components/schemas/voiceIntegrationId'
          action:
            $ref: '#/components/schemas/bulkProvisioningActionEnum'
          status:
            $ref: '#/components/schemas/bulkProvisioningPhoneNumberStatusEnum'
          code:
            $ref: '#/components/schemas/bulkProvisioningErrorCode'
          description:
            $ref: '#/components/schemas/bulkProvisioningErrorDescription'
          statusUpdated:
            $ref: '#/components/schemas/bulkProvisioningStatusUpdated'
    bulkVoiceProvisioningTask:
      type: object
      description: Details about an async bulk provisioning task for voice phone numbers.
      properties:
        bulkId:
          $ref: '#/components/schemas/bulkId'
        status:
          $ref: '#/components/schemas/bulkProvisioningStatusEnum'
        action:
          $ref: '#/components/schemas/bulkProvisioningActionEnum'
        voiceIntegrations:
          type: array
          items:
            $ref: '#/components/schemas/voiceIntegrationId'
        phoneNumbers:
          type: array
          items:
            properties:
              phoneNumber:
                $ref: '#/components/schemas/phoneNumber'
              voiceIntegrationId:
                $ref: '#/components/schemas/voiceIntegrationId'
              status:
                $ref: '#/components/schemas/bulkProvisioningPhoneNumberStatusEnum'
              code:
                $ref: '#/components/schemas/bulkProvisioningErrorCode'
              description:
                $ref: '#/components/schemas/bulkProvisioningErrorDescription'
              statusUpdated:
                $ref: '#/components/schemas/bulkProvisioningStatusUpdated'
    voiceProvisioningPhoneNumberDetail:
      type: object
      description: Phone number and voice provisioning details.
      required:
        - phoneNumber
        - voiceConfigurationPackage
        - inboundActivated
        - outboundNationalActivated
        - outboundInternationalActivated
        - integrations
      properties:
        phoneNumber:
          $ref: '#/components/schemas/phoneNumber'
        override:
          $ref: '#/components/schemas/override'
        voiceConfigurationPackage:
          $ref: '#/components/schemas/voiceConfigurationPackage'
        inboundActivated:
          $ref: '#/components/schemas/inboundActivated'
        outboundNationalActivated:
          $ref: '#/components/schemas/outboundNationalActivated'
        outboundInternationalActivated:
          $ref: '#/components/schemas/outboundInternationalActivated'
        integrations:
          $ref: '#/components/schemas/integrations'
    voiceProvisioningPhoneNumberPageMeta:
      title: Pagination Metadata
      type: object
      properties:
        pageSize:
          type: integer
          description: The size of pages returned.
          minimum: 1
          maximum: 5000
          example: 1
      nullable: true
    voiceProvisioningPhoneNumberLink:
      type: object
      description: >-
        A reference to an action that can be taken next generated from the
        context of the previous request.
      properties:
        rel:
          $ref: '#/components/schemas/rel'
        href:
          $ref: '#/components/schemas/href'
        method:
          $ref: '#/components/schemas/method'
    voiceProvisioningPhoneNumberDetailsResponse:
      type: object
      description: List of phone numbers and their voice provisioning details.
      properties:
        links:
          type: array
          description: Links to related resources.
          items:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberLink'
          nullable: true
        data:
          type: array
          description: List of phone numbers and their voice provisioning details.
          items:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberDetail'
          nullable: true
        errors:
          type: array
          description: Errors that occurred during the request.
          items:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberError'
          nullable: true
        page:
          $ref: '#/components/schemas/voiceProvisioningPhoneNumberPageMeta'
      required:
        - links
        - data
        - errors
    voiceProvisioningPhoneNumberDetailResponse:
      type: object
      description: Response containing voice provisioning details for a phone number.
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberLink'
          nullable: true
        data:
          $ref: '#/components/schemas/voiceProvisioningPhoneNumberDetail'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberError'
          nullable: true
      required:
        - links
        - data
        - errors
    getBulkVoiceProvisioningTaskByIdResponse:
      type: object
      description: Get bulk voice provisioning task by id response
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberLink'
        data:
          $ref: '#/components/schemas/bulkVoiceProvisioningTask'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberError'
      required:
        - links
        - data
        - errors
    bulkVoicePhoneNumbersAcceptedResponse:
      type: object
      description: Bulk voice phone numbers accepted response
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberLink'
        data:
          type: object
          properties:
            bulkId:
              $ref: '#/components/schemas/bulkId'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberError'
          nullable: true
      required:
        - links
        - data
        - errors
    voiceProvisioningPhoneNumberErrorResponse:
      type: object
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberLink'
          nullable: true
        data:
          type: object
          nullable: true
          example: null
        errors:
          type: array
          items:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberError'
          nullable: true
      required:
        - links
        - data
        - errors
    voiceProvisioningPhoneNumberError:
      type: object
      description: >-
        Information related to an error that occurred during when processing a
        request.
      properties:
        type:
          type: string
          description: Error type.
          example: VALIDATION
        description:
          type: string
          description: User-friendly readable description of the error.
          example: >-
            The phoneNumber=+19191234567 was not found associated with
            accountId=1234567. If this issue persists, please contact Bandwidth
            support.
        code:
          type: string
          description: Unique error code.
          example: VCS-0001
        meta:
          type: object
          description: >-
            An optional object which is a map of key value pair, provided to
            give more information around context, details, or additional
            information about the error that only applies to specific errors
            encountered.
          properties:
            items:
              type: object
      required:
        - type
        - description
        - code
    voiceProvisioningPhoneNumberUpdateResponse:
      type: object
      description: List of phone numbers that were just updated.
      properties:
        links:
          type: array
          description: Links to related resources.
          items:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberLink'
          nullable: true
        data:
          type: array
          description: List of phone numbers and their voice provisioning details.
          items:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberDetail'
          nullable: true
        errors:
          type: array
          description: Errors that occurred during the request.
          items:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberError'
          nullable: true
      required:
        - links
        - data
        - errors
    voiceBulkPhoneNumbersRequestBody:
      type: object
      description: Request body object for bulk provisioning voice phone numbers.
      properties:
        action:
          description: The action to be performed on the phone numbers.
          $ref: '#/components/schemas/bulkProvisioningActionEnum'
        phoneNumbers:
          type: array
          description: >-
            List of E.164 phone numbers to perform the bulk provisioning action
            on.
          items:
            $ref: '#/components/schemas/phoneNumber'
        voiceIntegrations:
          type: array
          description: >-
            List of voice integrations to associate phone numbers with for the
            ADD_INTEGRATION, REMOVE_INTEGRATION and TRANSFER_INTEGRATION
            actions.
          items:
            $ref: '#/components/schemas/voiceIntegrationId'
    voicePhoneNumberSearchRequestBody:
      type: object
      description: Request body object for searching and filtering voice phone numbers.
      properties:
        queryCriteria:
          type: array
          description: >-
            List of query criteria to filter phone numbers by. When multiple
            filters are provided they will be applied using the AND operator.
          items:
            $ref: '#/components/schemas/queryCriteria'
  parameters:
    accountId:
      name: accountId
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/accountId'
    afterCursor:
      name: afterCursor
      in: query
      required: false
      schema:
        $ref: '#/components/schemas/afterCursor'
    bulkId:
      in: path
      name: bulkId
      required: true
      schema:
        $ref: '#/components/schemas/bulkId'
    limit:
      in: query
      name: limit
      required: false
      schema:
        $ref: '#/components/schemas/limit'
    phoneNumber:
      in: path
      name: phoneNumber
      required: true
      schema:
        $ref: '#/components/schemas/phoneNumber'
    voiceConfigurationPackageId:
      name: voiceConfigurationPackageId
      in: query
      required: false
      schema:
        $ref: '#/components/schemas/voiceConfigurationPackageIdQueryParameter'
  requestBodies:
    updateVoicePhoneNumbersRequest:
      description: A list of phone numbers with override details or create or updated.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/voicePhoneNumberUpdateList'
          examples:
            updatePhoneNumbersWithOverrides:
              summary: Update phone numbers with overrides
              description: >-
                Example showing how to update multiple phone numbers, some with
                overrides and some with null overrides
              value:
                - phoneNumber: '+19191234567'
                  override:
                    originationRoutePlan:
                      routes:
                        - priority: 1
                          name: Custom Override Route
                          endpoints:
                            - endpoint: '+19195551234'
                              type: TN
                              weight: 50
                            - endpoint: 1.2.3.4:8080
                              type: IP_V4
                              weight: 50
                              rewriteUser: rewrite-user@example.com
                - phoneNumber: '+19197654321'
                  override: null
                - phoneNumber: '+19198887777'
                  override:
                    originationRoutePlan:
                      routes:
                        - priority: 1
                          name: Integration Override
                          endpoints:
                            - endpoint: 6543c038-8f8c-4489-8dd2-c14063f39321
                              type: INTEGRATION
                              weight: 100
            removeOverride:
              summary: Remove override from a phone number
              description: Example showing how to remove an override by setting it to null
              value:
                - phoneNumber: '+19191234567'
                  override: null
            addOverride:
              summary: Add override to a phone number
              description: Example showing how to add an override to a phone number
              value:
                - phoneNumber: '+19191234567'
                  override:
                    originationRoutePlan:
                      routes:
                        - priority: 1
                          name: New Override Route
                          endpoints:
                            - endpoint: '+19195551234'
                              type: TN
                              weight: 100
    searchVoicePhoneNumbersRequest:
      description: Request body supplied to the voice phone number search endpoint.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/voicePhoneNumberSearchRequestBody'
          examples:
            searchByPhoneNumbers:
              $ref: '#/components/examples/searchByPhoneNumbersRequestBody'
    voiceBulkPhoneNumbersRequest:
      description: >-
        Request body supplied to the bulk voice phone number provisioning
        endpoint.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/voiceBulkPhoneNumbersRequestBody'
          examples:
            bulkAddIntegrationRequestBody:
              $ref: '#/components/examples/bulkAddIntegrationRequestBody'
            bulkRemoveIntegrationRequestBody:
              $ref: '#/components/examples/bulkRemoveIntegrationRequestBody'
            bulkTnTransferIntegrationRequestBody:
              $ref: '#/components/examples/bulkTnTransferIntegrationRequestBody'
  responses:
    getPhoneNumberVoiceProvisioningDetailsResponse:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberDetailResponse'
          examples:
            getVoicePhoneNumber:
              $ref: '#/components/examples/getVoicePhoneNumber'
    listPhoneNumberVoiceProvisioningDetailsResponse:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberDetailsResponse'
          examples:
            listVoicePhoneNumbers:
              $ref: '#/components/examples/listVoicePhoneNumbers'
    updatePhoneNumberResponse:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberUpdateResponse'
          examples:
            updatePhoneNumbersWithOverridesResponse:
              summary: Response after updating phone numbers with overrides
              description: >-
                Shows the updated state of multiple phone numbers with mixed
                override configurations
              value:
                links: []
                data:
                  - phoneNumber: '+19191234567'
                    override:
                      originationRoutePlan:
                        routes:
                          - priority: 1
                            name: Custom Override Route
                            endpoints:
                              - endpoint: '+19195551234'
                                type: TN
                                weight: 50
                              - endpoint: 1.2.3.4:8080
                                type: IP_V4
                                weight: 50
                                rewriteUser: rewrite-user@example.com
                    voiceConfigurationPackage:
                      voiceConfigurationPackageId: 3bc3c038-8f8c-4489-8dd2-c14063f395e2
                      accountId: 1234567
                      name: Example Voice Configuration Package
                      description: Example VCP description
                      originationRoutePlan:
                        routes:
                          - priority: 1
                            name: Primary Route
                            endpoints:
                              - endpoint: 6543c038-8f8c-4489-8dd2-c14063f39321
                                type: INTEGRATION
                                weight: 100
                      stirShakenBehavior:
                        verstat: ENHANCED
                        identity: false
                      cnam:
                        enabled: true
                      httpV2VoiceApplicationId: null
                      pindropIntegration:
                        enabled: false
                      callVerification:
                        enabled: false
                    inboundActivated: true
                    outboundNationalActivated: true
                    outboundInternationalActivated: true
                    integrations: null
                  - phoneNumber: '+19197654321'
                    override: null
                    voiceConfigurationPackage:
                      voiceConfigurationPackageId: 3bc3c038-8f8c-4489-8dd2-c14063f395e2
                      accountId: 1234567
                      name: Example Voice Configuration Package
                      description: Example VCP description
                      originationRoutePlan:
                        routes:
                          - priority: 1
                            name: Primary Route
                            endpoints:
                              - endpoint: 6543c038-8f8c-4489-8dd2-c14063f39321
                                type: INTEGRATION
                                weight: 100
                      stirShakenBehavior:
                        verstat: ENHANCED
                        identity: false
                      cnam:
                        enabled: true
                      httpV2VoiceApplicationId: null
                      pindropIntegration:
                        enabled: false
                      callVerification:
                        enabled: false
                    inboundActivated: true
                    outboundNationalActivated: true
                    outboundInternationalActivated: true
                    integrations: null
                  - phoneNumber: '+19198887777'
                    override:
                      originationRoutePlan:
                        routes:
                          - priority: 1
                            name: Integration Override
                            endpoints:
                              - endpoint: 6543c038-8f8c-4489-8dd2-c14063f39321
                                type: INTEGRATION
                                weight: 100
                    voiceConfigurationPackage:
                      voiceConfigurationPackageId: 3bc3c038-8f8c-4489-8dd2-c14063f395e2
                      accountId: 1234567
                      name: Example Voice Configuration Package
                      description: Example VCP description
                      originationRoutePlan:
                        routes:
                          - priority: 1
                            name: Primary Route
                            endpoints:
                              - endpoint: 6543c038-8f8c-4489-8dd2-c14063f39321
                                type: INTEGRATION
                                weight: 100
                      stirShakenBehavior:
                        verstat: ENHANCED
                        identity: false
                      cnam:
                        enabled: true
                      httpV2VoiceApplicationId: null
                      pindropIntegration:
                        enabled: false
                      callVerification:
                        enabled: false
                    inboundActivated: true
                    outboundNationalActivated: true
                    outboundInternationalActivated: true
                    integrations:
                      currentVoiceIntegrationId: 6543c038-8f8c-4489-8dd2-c14063f39321
                      voiceIntegrationType: zoom_cc_us
                      tasks:
                        - bulkId: abd3c038-8f8c-4489-8dd2-c14063f39cf1
                          voiceIntegrationId: 6543c038-8f8c-4489-8dd2-c14063f39321
                          action: ADD_INTEGRATION
                          status: SUCCESS
                          code: null
                          description: null
                          statusUpdated: '2025-01-01T00:00:00Z'
                errors: []
            removeOverrideResponse:
              summary: Response after removing override from a phone number
              description: >-
                Shows the phone number state after override was removed (set to
                null)
              value:
                links: []
                data:
                  - phoneNumber: '+19191234567'
                    override: null
                    voiceConfigurationPackage:
                      voiceConfigurationPackageId: 3bc3c038-8f8c-4489-8dd2-c14063f395e2
                      accountId: 1234567
                      name: Example Voice Configuration Package
                      description: Example VCP description
                      originationRoutePlan:
                        routes:
                          - priority: 1
                            name: Primary Route
                            endpoints:
                              - endpoint: 6543c038-8f8c-4489-8dd2-c14063f39321
                                type: INTEGRATION
                                weight: 100
                      stirShakenBehavior:
                        verstat: ENHANCED
                        identity: false
                      cnam:
                        enabled: true
                      httpV2VoiceApplicationId: null
                      pindropIntegration:
                        enabled: false
                      callVerification:
                        enabled: false
                    inboundActivated: true
                    outboundNationalActivated: true
                    outboundInternationalActivated: true
                    integrations: null
                errors: []
            addOverrideResponse:
              summary: Response after adding override to a phone number
              description: Shows the phone number state after a new override was added
              value:
                links: []
                data:
                  - phoneNumber: '+19191234567'
                    override:
                      originationRoutePlan:
                        routes:
                          - priority: 1
                            name: New Override Route
                            endpoints:
                              - endpoint: '+19195551234'
                                type: TN
                                weight: 100
                    voiceConfigurationPackage:
                      voiceConfigurationPackageId: 3bc3c038-8f8c-4489-8dd2-c14063f395e2
                      accountId: 1234567
                      name: Example Voice Configuration Package
                      description: Example VCP description
                      originationRoutePlan:
                        routes:
                          - priority: 1
                            name: Primary Route
                            endpoints:
                              - endpoint: 6543c038-8f8c-4489-8dd2-c14063f39321
                                type: INTEGRATION
                                weight: 100
                      stirShakenBehavior:
                        verstat: ENHANCED
                        identity: false
                      cnam:
                        enabled: true
                      httpV2VoiceApplicationId: null
                      pindropIntegration:
                        enabled: false
                      callVerification:
                        enabled: false
                    inboundActivated: true
                    outboundNationalActivated: true
                    outboundInternationalActivated: true
                    integrations: null
                errors: []
    searchVoicePhoneNumbersResponse:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberDetailsResponse'
          examples:
            searchVoicePhoneNumbersResponse:
              $ref: '#/components/examples/searchVoicePhoneNumbers'
    bulkVoicePhoneNumbersAcceptedResponse:
      description: ACCEPTED
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/bulkVoicePhoneNumbersAcceptedResponse'
          examples:
            bulkVoicePhoneNumbersAccepted:
              $ref: '#/components/examples/createAsyncBulkProvisioningTaskFullSuccess'
    bulkVoicePhoneNumbersResponse:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/getBulkVoiceProvisioningTaskByIdResponse'
          examples:
            getBulkVoiceProvisioningTaskById:
              $ref: '#/components/examples/getBulkVoiceProvisioningTaskById'
    voicePhoneNumbersBadRequestErrorResponse:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberErrorResponse'
          examples:
            voiceConfigurationPackagesFeatureNotEnabled:
              $ref: '#/components/examples/voiceConfigurationPackagesNotEnabledError'
    voicePhoneNumbersNotFoundErrorResponse:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberErrorResponse'
          examples:
            phoneNumberNotFoundError:
              $ref: '#/components/examples/phoneNumberNotFoundError'
    voicePhoneNumbersMethodNotAllowedErrorResponse:
      description: Method Not Allowed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberErrorResponse'
          examples:
            methodNotAllowedError:
              $ref: '#/components/examples/methodNotAllowedError'
    voicePhoneNumbersConflictErrorResponse:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberErrorResponse'
          examples:
            conflictError:
              $ref: '#/components/examples/conflictError'
    voicePhoneNumbersTooManyRequestsErrorResponse:
      description: Too Many Requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberErrorResponse'
          examples:
            rateLimitError:
              $ref: '#/components/examples/rateLimitError'
    voicePhoneNumbersInternalServerErrorResponse:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberErrorResponse'
          examples:
            unknownError:
              $ref: '#/components/examples/unknownError'
    voicePhoneNumbersUnauthorizedErrorResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberErrorResponse'
          examples:
            unauthorizedError:
              $ref: '#/components/examples/unauthorizedError'
    voicePhoneNumbersForbiddenErrorResponse:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/voiceProvisioningPhoneNumberErrorResponse'
          examples:
            forbiddenError:
              $ref: '#/components/examples/forbiddenError'
  examples:
    searchByPhoneNumbersRequestBody:
      summary: Search by phone numbers request body
      value:
        queryCriteriaList:
          - parameter: phoneNumber
            operator: EQ
            values:
              - '+19191234567'
              - '+19197654321'
    bulkAddIntegrationRequestBody:
      summary: Bulk add voice integration request body
      value:
        action: ADD_INTEGRATION
        phoneNumbers:
          - '+19191234567'
          - '+19197654321'
        voiceIntegrations:
          - 3bc3c038-8f8c-4489-8dd2-c14063f395e2
    bulkRemoveIntegrationRequestBody:
      summary: Bulk remove voice integration request body
      value:
        action: REMOVE_INTEGRATION
        phoneNumbers:
          - '+19191234567'
          - '+19197654321'
        voiceIntegrations:
          - 3bc3c038-8f8c-4489-8dd2-c14063f395e2
    bulkTnTransferIntegrationRequestBody:
      summary: Bulk tn transfer voice integration request body
      value:
        action: TRANSFER_INTEGRATION
        phoneNumbers:
          - '+19191234567'
          - '+19197654321'
        voiceIntegrations:
          - 3bc3c038-8f8c-4489-8dd2-c14063f395e2
    getVoicePhoneNumber:
      summary: Get voice phone number
      value:
        data:
          phoneNumber: '+19191234567'
          override:
            originationRoutePlan:
              routes:
                - priority: 1
                  name: Override Route
                  endpoints:
                    - endpoint: '+19195551234'
                      type: TN
                      weight: 50
                    - endpoint: 1.2.3.4:8080
                      type: IP_V4
                      weight: 50
                      rewriteUser: rewrite-user@example.com
          voiceConfigurationPackage:
            voiceConfigurationPackageId: 3bc3c038-8f8c-4489-8dd2-c14063f395e2
            accountId: 1234567
            name: Example Voice Configuration Package
            description: Example VCP description
            originationRoutePlan:
              routes:
                - priority: 1
                  name: Primary Route
                  endpoints:
                    - endpoint: 6543c038-8f8c-4489-8dd2-c14063f39321
                      type: INTEGRATION
                      weight: 50
                    - endpoint: '+19191234567'
                      type: TN
                      weight: 50
            stirShakenBehavior:
              verstat: ENHANCED
              identity: false
            cnam:
              enabled: true
            httpV2VoiceApplicationId: null
            pindropIntegration:
              enabled: false
            callVerification:
              enabled: false
          inboundActivated: true
          outboundNationalActivated: true
          outboundInternationalActivated: true
          integrations:
            currentVoiceIntegrationId: 6543c038-8f8c-4489-8dd2-c14063f39321
            voiceIntegrationType: zoom_cc_us
            tasks:
              - bulkId: abd3c038-8f8c-4489-8dd2-c14063f39cf1
                voiceIntegrationId: 6543c038-8f8c-4489-8dd2-c14063f39321
                action: ADD_INTEGRATION
                status: SUCCESS
                code: null
                description: null
                statusUpdated: '2025-01-01T00:00:00Z'
        links: []
        errors: []
    listVoicePhoneNumbers:
      summary: List voice phone numbers
      value:
        data:
          - phoneNumber: '+19191234567'
            override:
              originationRoutePlan:
                routes:
                  - priority: 1
                    name: Override Route
                    endpoints:
                      - endpoint: '+19195551234'
                        type: TN
                        weight: 50
                      - endpoint: 1.2.3.4:8080
                        type: IP_V4
                        weight: 50
                        rewriteUser: rewrite-user@example.com
            voiceConfigurationPackage:
              voiceConfigurationPackageId: 3bc3c038-8f8c-4489-8dd2-c14063f395e2
              accountId: 1234567
              name: Example Voice Configuration Package
              description: Example VCP description
              originationRoutePlan:
                routes:
                  - priority: 1
                    name: Primary Route
                    endpoints:
                      - endpoint: 6543c038-8f8c-4489-8dd2-c14063f39321
                        type: INTEGRATION
                        weight: 50
                      - endpoint: '+19191234567'
                        type: TN
                        weight: 50
                  - priority: 2
                    name: Failover Route
                    endpoints:
                      - endpoint: '+19191234567'
                        type: TN
                        weight: 100
              stirShakenBehavior:
                verstat: ENHANCED
                identity: false
              cnam:
                enabled: true
              httpV2VoiceApplicationId: null
              pindropIntegration:
                enabled: false
              callVerification:
                enabled: false
            inboundActivated: true
            outboundNationalActivated: true
            outboundInternationalActivated: true
            integrations:
              currentVoiceIntegrationId: 6543c038-8f8c-4489-8dd2-c14063f39321
              voiceIntegrationType: zoom_cc_us
              tasks:
                - bulkId: abd3c038-8f8c-4489-8dd2-c14063f39cf1
                  voiceIntegrationId: 6543c038-8f8c-4489-8dd2-c14063f39321
                  action: ADD_INTEGRATION
                  status: SUCCESS
                  code: null
                  description: null
                  statusUpdated: '2025-01-01T00:00:00Z'
          - phoneNumber: '+19197654321'
            override: null
            voiceConfigurationPackage: null
            inboundActivated: false
            outboundNationalActivated: false
            outboundInternationalActivated: false
            integrations: null
        links:
          - href: >-
              https://api.bandwidth.com/v2/accounts/1234567/phoneNumbers/voice?limit=2
            rel: self
            method: GET
          - href: >-
              https://api.bandwidth.com/v2/accounts/1234567/phoneNumbers/voice?limit=2&afterCursor=Q29uZ3JhdHVsYXRpb25zLCB5b3UgZm91bmQgdGhlIE9uZSBQaWVjZSA6KQo=
            rel: next
            method: GET
        errors: []
        page:
          pageSize: 2
    searchVoicePhoneNumbers:
      summary: Search voice phone numbers
      value:
        data:
          - phoneNumber: '+19191234567'
            override:
              originationRoutePlan:
                routes:
                  - priority: 1
                    name: Override Route
                    endpoints:
                      - endpoint: '+19195551234'
                        type: TN
                        weight: 50
                      - endpoint: 1.2.3.4:8080
                        type: IP_V4
                        weight: 50
                        rewriteUser: rewrite-user@example.com
            voiceConfigurationPackage:
              voiceConfigurationPackageId: 3bc3c038-8f8c-4489-8dd2-c14063f395e2
              accountId: 1234567
              name: Example Voice Configuration Package
              description: Example VCP description
              originationRoutePlan:
                routes:
                  - priority: 1
                    name: Primary Route
                    endpoints:
                      - endpoint: 6543c038-8f8c-4489-8dd2-c14063f39321
                        type: INTEGRATION
                        weight: 50
                      - endpoint: '+19191234567'
                        type: TN
                        weight: 50
                  - priority: 2
                    name: Failover Route
                    endpoints:
                      - endpoint: '+19191234567'
                        type: TN
                        weight: 100
              stirShakenBehavior:
                verstat: ENHANCED
                identity: false
              cnam:
                enabled: true
              httpV2VoiceApplicationId: null
              pindropIntegration:
                enabled: false
              callVerification:
                enabled: false
            inboundActivated: true
            outboundNationalActivated: true
            outboundInternationalActivated: true
            integrations:
              currentVoiceIntegrationId: 6543c038-8f8c-4489-8dd2-c14063f39321
              voiceIntegrationType: zoom_cc_us
              tasks:
                - bulkId: abd3c038-8f8c-4489-8dd2-c14063f39cf1
                  voiceIntegrationId: 6543c038-8f8c-4489-8dd2-c14063f39321
                  action: ADD_INTEGRATION
                  status: SUCCESS
                  code: null
                  description: null
                  statusUpdated: '2025-01-01T00:00:00Z'
          - phoneNumber: '+19197654321'
            override: null
            voiceConfigurationPackage: null
            inboundActivated: false
            outboundNationalActivated: false
            outboundInternationalActivated: false
            integrations: null
        links:
          - href: >-
              https://api.bandwidth.com/v2/accounts/1234567/phoneNumbers/voice/search
            rel: self
            method: GET
        errors: []
        page:
          pageSize: 2
    createAsyncBulkProvisioningTaskFullSuccess:
      summary: Create async bulk provisioning task - full success
      value:
        data:
          bulkId: abd3c038-8f8c-4489-8dd2-c14063f39cf1
        links:
          - href: >-
              https://api.bandwidth.com/v2/accounts/1234567/phoneNumbers/voice/bulk/abd3c038-8f8c-4489-8dd2-c14063f39cf1
            rel: self
            method: GET
        errors: []
    getBulkVoiceProvisioningTaskById:
      summary: Get bulk provisioning task by ID
      value:
        data:
          bulkId: abd3c038-8f8c-4489-8dd2-c14063f39cf1
          status: COMPLETE_SUCCESS
          action: ADD_INTEGRATION
          voiceIntegrations:
            - 6543c038-8f8c-4489-8dd2-c14063f39321
          phoneNumbers:
            - phoneNumber: '+19191234567'
              voiceIntegrationId: 6543c038-8f8c-4489-8dd2-c14063f39321
              status: SUCCESS
              code: null
              description: null
              statusUpdated: '2025-01-01T00:00:00Z'
            - phoneNumber: '+19197654321'
              voiceIntegrationId: 6543c038-8f8c-4489-8dd2-c14063f39321
              status: SUCCESS
              code: null
              description: null
              statusUpdated: '2025-02-01T00:00:00Z'
        links:
          - href: >-
              https://api.bandwidth.com/v2/accounts/1234567/phoneNumbers/voice/bulk/abd3c038-8f8c-4489-8dd2-c14063f39cf1
            rel: self
            method: GET
        errors: []
    voiceConfigurationPackagesNotEnabledError:
      summary: Voice Configuration Packages Not Enabled
      value:
        data: null
        links: []
        errors:
          - code: VCS-0085
            type: VALIDATION
            description: >-
              accountId=%d does not have the Voice Configuration Package feature
              enabled. Please contact Bandwidth support to add this feature to
              your account.
    unauthorizedError:
      summary: Unauthorized Error
      value:
        data: null
        links: []
        errors:
          - code: VCS-0004
            type: AUTHORIZATION
            description: Unauthorized
    forbiddenError:
      summary: Forbidden Error
      value:
        data: null
        links: []
        errors:
          - code: VCS-0132
            type: AUTHORIZATION
            description: Forbidden
    phoneNumberNotFoundError:
      summary: Not Found Error
      value:
        data: null
        links: []
        errors:
          - code: VCS-0043
            type: RESOURCE_NOT_FOUND
            description: >-
              The phoneNumber=+19191234567 was not found associated with
              accountId=1234567. If this issue persists, please contact
              Bandwidth support.
    methodNotAllowedError:
      summary: Method Not Allowed Error
      value:
        data: null
        links: []
        errors:
          - code: VCS-9999
            type: VALIDATION
            description: Method not allowed.
    conflictError:
      summary: Conflict Error
      value:
        data: null
        links: []
        errors:
          - code: VCS-9999
            type: VALIDATION
            description: Reason for conflict.
    rateLimitError:
      summary: Rate Limit Error
      value:
        data: null
        links: []
        errors:
          - code: VCS-0098
            type: RATE_LIMITED
            description: Rate limit exceeded. Please try again after 2025-01-01T00:00:00Z.
    unknownError:
      summary: Unknown 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>`
