Interface AvailableNumberService
-
public interface AvailableNumberServiceAvailable Number Service- Since:
- 1.0
- See Also:
- https://developers.sinch.com/docs/numbers/api-reference/numbers/tag/Available-Number
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AvailableNumbercheckAvailability(String phoneNumber)Get available number information by phone numberAvailableNumberListResponselist(AvailableNumberListAllRequestParameters parameters)Search for available phone numbersActiveNumberrent(String phoneNumber, AvailableNumberRentRequestParameters parameters)Activate a new phone numberActiveNumberrentAny(AvailableNumberRentAnyRequestParameters parameters)Rent any number that matches the criteria
-
-
-
Method Detail
-
list
AvailableNumberListResponse list(AvailableNumberListAllRequestParameters parameters) throws ApiException
Search for available phone numbersSearch 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 numberThis 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 numberActivate 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 activatedparameters- Activation parameters- Returns:
- Activated number
- Throws:
ApiException- Since:
- 1.0
-
rentAny
ActiveNumber rentAny(AvailableNumberRentAnyRequestParameters parameters) throws ApiException
Rent any number that matches the criteriaActivates 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
-
-