Interface NumbersService
- Since:
- 1.2
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncallback()
Callbacks Configuration Service instancecheckAvailability
(String phoneNumber) Get available number information by phone numberGet active number information by phone numberlist
(ActiveNumberListRequest parameters) Lists active numbers for a projectregions()
Available Region Service instanceRelease an active number from the projectrent
(String phoneNumber, AvailableNumberRentRequest parameters) Activate a new phone numberrentAny
(AvailableNumberRentAnyRequest parameters) Rent any number that matches the criteriasearchForAvailableNumbers
(AvailableNumberListRequest parameters) Search for available phone numbersupdate
(String phoneNumber, ActiveNumberUpdateRequest parameters) Update an active phone numberwebhooks()
Webhooks helpers instance
-
Method Details
-
searchForAvailableNumbers
AvailableNumberListResponse searchForAvailableNumbers(AvailableNumberListRequest 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.2
-
checkAvailability
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.2
-
rent
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.2
-
rentAny
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.2
-
list
Lists active numbers for a project- Parameters:
parameters
- Filtering criteria- Returns:
- List of active numbers
- Throws:
ApiException
- Since:
- 1.2
-
get
Get active number information by phone number- Parameters:
phoneNumber
- Phone number- Returns:
- Active number information
- Throws:
ApiException
- Since:
- 1.2
-
update
Update an active phone number- Parameters:
phoneNumber
- Phone numberparameters
- Parameters to be updated- Returns:
- Updated active number
- Throws:
ApiException
- Since:
- 1.2
-
release
Release an active number from the project- Parameters:
phoneNumber
- Phone number- Returns:
- Released active number
- Throws:
ApiException
- Since:
- 1.2
-
regions
AvailableRegionService regions()Available Region Service instance- Returns:
- service instance for project
- Since:
- 1.2
-
callback
CallbackConfigurationService 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
-