Interface NumbersService


public interface NumbersService
Numbers Service
Since:
1.2
See Also:
  • Method Details

    • searchForAvailableNumbers

      AvailableNumberListResponse searchForAvailableNumbers(AvailableNumberListRequest 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.2
    • 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.2
    • rent

      ActiveNumber rent(String phoneNumber, AvailableNumberRentRequest 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.2
    • rentAny

      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.2
    • list

      Lists active numbers for a project
      Parameters:
      parameters - Filtering criteria
      Returns:
      List of active numbers
      Throws:
      ApiException
      Since:
      1.2
    • get

      ActiveNumber get(String phoneNumber) throws ApiException
      Get active number information by phone number
      Parameters:
      phoneNumber - Phone number
      Returns:
      Active number information
      Throws:
      ApiException
      Since:
      1.2
    • update

      ActiveNumber update(String phoneNumber, ActiveNumberUpdateRequest parameters) throws ApiException
      Update an active phone number
      Parameters:
      phoneNumber - Phone number
      parameters - Parameters to be updated
      Returns:
      Updated active number
      Throws:
      ApiException
      Since:
      1.2
    • release

      ActiveNumber release(String phoneNumber) throws ApiException
      Release an active number from the project
      Parameters:
      phoneNumber - Phone number
      Returns:
      Released active number
      Throws:
      ApiException
      Since:
      1.2
    • regions

      Available Region Service instance
      Returns:
      service instance for project
      Since:
      1.2
    • callback

      Callbacks Configuration Service instance
      Returns:
      service instance for project
      Since:
      1.2
    • webhooks

      WebHooksService webhooks()
      Webhooks helpers instance
      Returns:
      instance service related to webhooks helpers
      Since:
      1.2