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

# Search Plivo Numbers

> Search available phone numbers from Plivo.

Read only
Searches Plivo's inventory of phone numbers that are available for purchase. This is the discovery step before buying: find a number in the country and pattern you want, then pass it to [Buy Phone Number](https://dialnexa.com/docs/api-reference/v1/phone-numbers/buy.md).

## When to use this

* **Provisioning a new line**: find an available number in the destination country before purchasing it for inbound or outbound calling.
* **Self-serve number pickers**: let users of your own product browse available numbers before you buy one on their behalf.

If you bring your own number instead of buying one, skip this endpoint and use [Link SIP Trunk](https://dialnexa.com/docs/api-reference/v1/phone-numbers/link-sip-trunk.md).

## Result

The response is Plivo's own search result, passed through unchanged: `api_id`, `meta` and the candidate numbers in `objects`. Plivo lists each `number` as digits without a plus sign; pass it to [Buy Phone Number](https://dialnexa.com/docs/api-reference/v1/phone-numbers/buy.md) exactly as returned. Plivo can include fields beyond those in the schema on this page. When Plivo has no numbers for your filters, the response is still `200`, with an empty `objects` list, `meta.total_count` of `0`, and Plivo's explanation in `error` (for example `We are currently unable to offer your requested numbers`); try another region, type or pattern. Availability is live inventory and can change between searching and buying, so purchase promptly after picking a number. See [API errors](https://dialnexa.com/docs/api-reference/api-fundamentals.md#handle-dialnexa-api-errors) for the standard error format.

## Query parameters

| Parameter | Description |
| - | - |
| `country_iso` | ISO country code (e.g., IN, US, GB). |
| `type` | Number type: local, tollfree, or mobile. Defaults to tollfree. |
| `region` | City or state filter. For IN it is sent to Plivo as city (for example Mumbai, Bengaluru, Chennai). For Mumbai and Bengaluru (or Bangalore) only, a city search that returns no numbers is retried with the city's STD code as a number pattern. For other countries it is sent as region (for example California, Texas). |

## Related endpoints

* [Buy Phone Number](https://dialnexa.com/docs/api-reference/v1/phone-numbers/buy.md): purchase a number found here.
* [List Phone Numbers](https://dialnexa.com/docs/api-reference/v1/phone-numbers/list.md): the numbers your workspace already owns.
* [Link SIP Trunk](https://dialnexa.com/docs/api-reference/v1/phone-numbers/link-sip-trunk.md): bring your own number instead.


## OpenAPI

````yaml GET /v1/organization-phone-numbers/plivo-numbers
openapi: 3.0.0
info:
  title: DialNexa API
  description: Public `/v1` REST API for the DialNexa voice AI platform.
  version: 1.0.0
servers:
  - url: https://api.dialnexa.com
    description: DialNexa production API
security:
  - bearer: []
tags:
  - name: Agents
  - name: Batch Calls
  - name: Calls
  - name: Knowledge Base
  - name: Languages
  - name: LLMs
  - name: Phone Numbers
  - name: Organization Folders
  - name: Transcribers
  - name: Webhooks
  - name: Voices
  - name: Workflows
  - name: Workflow Leads
  - name: Authentication
  - name: Agent Builder
  - name: Agent Evaluations
paths:
  /v1/organization-phone-numbers/plivo-numbers:
    get:
      tags:
        - Phone Numbers
      summary: Search Plivo Numbers
      description: >-
        Searches available Plivo phone numbers that match the supplied filters.
        The response is Plivo's own search result, passed through unchanged.
      operationId: searchAvailablePhoneNumbers
      parameters:
        - name: country_iso
          required: true
          in: query
          description: ISO country code (e.g., IN, US, GB)
          schema:
            type: string
            example: IN
        - name: type
          required: false
          in: query
          description: 'Number type: local, tollfree, or mobile. Defaults to tollfree.'
          schema:
            example: tollfree
            type: string
            default: tollfree
        - name: region
          required: false
          in: query
          description: >-
            City or state filter. For IN it is sent to Plivo as city (for
            example Mumbai, Bengaluru, Chennai). For Mumbai and Bengaluru (or
            Bangalore) only, a city search that returns no numbers is retried
            with the city's STD code as a number pattern. For other countries it
            is sent as region (for example California, Texas).
          schema:
            example: Mumbai
            type: string
      responses:
        '200':
          description: Available Plivo numbers returned successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - error
                  - statusCode
                  - message
                  - data
                  - timestamp
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  error:
                    type: boolean
                    enum:
                      - false
                  statusCode:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: Success
                  data:
                    $ref: '#/components/schemas/AvailablePhoneNumbersResponse'
                  timestamp:
                    type: string
                    format: date-time
              examples:
                success:
                  summary: Successful response
                  value:
                    success: true
                    error: false
                    statusCode: 200
                    message: Success
                    data:
                      api_id: 9f6d7c
                      objects:
                        - number: '14155552671'
                          type: local
                          monthly_rental_rate: '0.80'
                          setup_rate: '0.00'
                          voice_enabled: true
                          sms_enabled: true
                          mms_enabled: false
                          country_iso: US
                          number_format: '14155552671'
                      meta:
                        total_count: 1
                    timestamp: '2026-09-07T06:00:00.000Z'
        '400':
          description: >-
            Plivo rejected the number search. The message starts with "Failed to
            fetch phone numbers from Plivo: " followed by Plivo's error, and the
            status code is Plivo's own, so other 4xx codes are possible.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  summary: 401 Unauthorized
                  value:
                    statusCode: 401
                    error: true
                    success: false
                    data: []
                    message: Invalid API key
                    errors: []
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  summary: 500 Internal Server Error
                  value:
                    statusCode: 500
                    error: true
                    success: false
                    data: []
                    message: Internal server error
                    errors: []
      security:
        - bearer: []
components:
  schemas:
    AvailablePhoneNumbersResponse:
      type: object
      properties:
        api_id:
          type: string
          description: API ID for the request
        objects:
          description: List of available phone numbers
          type: array
          items:
            $ref: '#/components/schemas/AvailablePhoneNumber'
        meta:
          type: object
          description: Total count of available numbers
        error:
          type: string
          description: >-
            Absent from the response when numbers are found. When Plivo has no
            numbers for the filters, its explanation, for example We are
            currently unable to offer your requested numbers; the status is
            still 200, objects is empty and meta.total_count is 0.
          example: We are currently unable to offer your requested numbers
      required:
        - api_id
        - objects
        - meta
      description: >-
        Plivo's search response, passed through unchanged. Plivo can include
        fields beyond those listed here.
    ErrorResponse:
      type: object
      description: Error body on endpoints without response filtering.
      properties:
        statusCode:
          type: integer
          example: 404
        error:
          type: boolean
          enum:
            - true
        success:
          type: boolean
          enum:
            - false
        data:
          oneOf:
            - type: object
              properties:
                code:
                  type: string
                  description: Machine-readable refusal code.
            - type: array
              items: {}
          description: >-
            For a coded refusal, an object with code and the details listed for
            that code. Otherwise an empty array.
        message:
          type: string
        errors:
          type: array
          items:
            type: string
          description: Validation messages for a 400. Empty for other errors.
        validation_errors:
          type: array
          description: >-
            Present when uploaded rows fail number validation (batch and
            workflow lead uploads): one group per distinct error.
          items:
            type: object
            properties:
              error:
                type: string
              rows:
                type: array
                items:
                  type: integer
                description: Row numbers with this error.
              phone_numbers:
                type: array
                items:
                  type: string
        invalid_row_count:
          type: integer
          description: 'Present with validation_errors: how many rows failed.'
      required:
        - statusCode
        - error
        - success
        - data
        - message
        - errors
    AvailablePhoneNumber:
      type: object
      properties:
        number:
          type: string
          description: The phone number, digits only, without a plus sign.
        type:
          type: string
          description: The type of phone number (local, tollfree, etc.)
        monthly_rental_rate:
          type: string
          description: The monthly rental rate for the phone number
        setup_rate:
          type: string
          description: The setup fee for the phone number
        voice_enabled:
          type: boolean
          description: Voice capability of the phone number
        sms_enabled:
          type: boolean
          description: SMS capability of the phone number
        mms_enabled:
          type: boolean
          description: MMS capability of the phone number
        country_iso:
          type: string
          description: Country ISO code
        number_format:
          type: string
          description: The number as Plivo formats it.
      required:
        - number
        - type
        - monthly_rental_rate
        - setup_rate
        - voice_enabled
        - sms_enabled
        - mms_enabled
        - country_iso
        - number_format
  securitySchemes:
    bearer:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.