The PhoneNumber Object
Attributes
string
Phone number that can be purchased.
string
Area code of the number.
string
City of the number. Returns
null for national numbers.string
Country of the number.
string
City and country of the number.
string
Rate center. US and Canada only.
string
Local access and transport area. US and Canada only.
string
Number type. Values:
fixed, mobile, or tollfree.string
Number subtype. Values:
fixed, mobile, tollfree, national, or local.string
One-time setup fee in USD.
string
Monthly rental fee in USD.
boolean
Whether the number can receive SMS.
string
Cost per SMS received in USD.
boolean
Whether the number can receive MMS.
string
Cost per MMS received in USD.
boolean
Whether the number can receive calls.
string
Cost per minute for calls in USD.
string
Verification requirement. Values:
city-address, country-address, terms-and-conditions, or null.string
Description of verification requirements.
string
URI to the phone number resource.
Example Object
Search Phone Numbers
Returns available phone numbers matching your criteria.Arguments
string
required
ISO 3166 alpha-2 country code of the country.
string
Number type filter. Values:
tollfree, local, mobile, national, or fixed.string
Pattern to match. For example,
415 returns numbers starting with 1415.integer
Six-digit prefix filter. US and Canada only.
boolean
Expand search to local calling area of
npanxx.string
Region name (e.g.,
Frankfurt). For fixed type only.string
City name. For
local type only.string
Filter by capabilities. Values:
voice, sms, mms, voice,sms, or voice,sms,mms.integer
LATA filter. US and Canada only.
string
Rate center filter. US and Canada only.
integer
Results per page. Maximum 20, default 20.
integer
Pagination offset. Default 0.
Example
Response
Buy a Phone Number
Purchase a phone number and add it to your account.Arguments
string
Application to assign. Defaults to
default_number_app.string
Enable CNAM lookup. Values:
enabled or disabled. US only.string
UUID of an
accepted compliance application to attach to the number at purchase. The application’s country and number type must match the number. If omitted, Plivo auto-selects your most recent applicable compliance application. See the Compliance API.string
Auth ID of a subaccount to assign the number to at purchase. Requires main-account credentials (see note below).
If the number requires verification documents, the number status will be
pending until documents are approved.Call this endpoint with main-account credentials. Phone numbers are billed and owned at the main-account level, so a request made with subaccount credentials returns
404 not found even when Search works with the same credentials. To buy a number for a subaccount, call this endpoint with main-account credentials and pass the subaccount parameter. To move an already-rented number to a subaccount, use the Update an Account Phone Number endpoint’s subaccount parameter.Example
Response
Related
- Account Phone Numbers - Manage your rented numbers
- Regulatory Compliance - Verification requirements
- Number Porting - Port numbers to Plivo