Interface AvailableNumberService

    • Method Detail

      • list

        AvailableNumberListResponse list​(AvailableNumberListAllRequestParameters parameters)
                                  throws ApiException
        Search for available phone numbers

        Search for available phone numbers that are available for you to activate. You can filter by any property on the available number resource.

        When searching, indicate the capability of the number in the array as SMS and/or VOICE. To search for a number capable of both, list both SMS and VOICE.

        Parameters:
        parameters - Filtering criteria
        Returns:
        List of available numbers according to search criteria
        Throws:
        ApiException
        Since:
        1.0
      • checkAvailability

        AvailableNumber checkAvailability​(String phoneNumber)
                                   throws ApiException
        Get available number information by phone number

        This endpoint allows you to enter a specific phone number to check if it's available for use

        Parameters:
        phoneNumber - Phone number
        Returns:
        Available number information
        Throws:
        ApiException
        Since:
        1.0
      • rent

        ActiveNumber rent​(String phoneNumber,
                          AvailableNumberRentRequestParameters parameters)
                   throws ApiException
        Activate a new phone number

        Activate a phone number to use with SMS products, Voice products, or both.

        You'll use smsConfiguration to setup your number for SMS and voiceConfiguration for Voice. To setup for both, add both objects. See the dropdown menu (just under language selection) for code samples.

        Note: You cannot add both objects if you only need to configure one object. For example, if you only need to configure smsConfiguration for SMS messaging, do not add the voiceConfiguration object or it will result in an error.

        Parameters:
        phoneNumber - Number to be activated
        parameters - Activation parameters
        Returns:
        Activated number
        Throws:
        ApiException
        Since:
        1.0
      • rentAny

        ActiveNumber rentAny​(AvailableNumberRentAnyRequestParameters parameters)
                      throws ApiException
        Rent any number that matches the criteria

        Activates a phone number that matches the search criteria provided in the request. Currently the rentAny operation works only for US LOCAL numbers

        Parameters:
        parameters - Selection and activation parameters
        Returns:
        Activated number according to criteria
        Throws:
        ApiException
        Since:
        1.0