# REST Resource: phoneNumbers

## Resource: PhoneNumber

The PhoneNumber resource.

<div class="highlight"><span class="filename">JSON representation</span><pre><code><span class="p">{</span>
  <span class="s2">&quot;name&quot;</span><span class="p">: </span><span class="kd">string</span><span class="p">,</span>
  <span class="s2">&quot;phoneNumber&quot;</span><span class="p">: </span><span class="kd">string</span><span class="p">,</span>
  <span class="s2">&quot;capabilities&quot;</span><span class="p">: </span><span class="p">[</span>
    <span class="kd">enum (</span><a href="#phonenumberphonenumbercapability"><strong><span class="kd">PhoneNumberCapability</span></strong></a><span class="kd">)</span>
  <span class="p">]</span><span class="p">,</span>
  <span class="s2">&quot;sku&quot;</span><span class="p">: </span><span class="kd">string</span><span class="p">,</span>
  <span class="s2">&quot;activationSku&quot;</span><span class="p">: </span><span class="kd">string</span><span class="p">,</span>
  <span class="s2">&quot;numberType&quot;</span><span class="p">: </span><span class="kd">enum (</span><a href="#phonenumberphonenumbertype"><strong><span class="kd">PhoneNumberType</span></strong></a><span class="kd">)</span><span class="p">,</span>
  <span class="s2">&quot;countryCode&quot;</span><span class="p">: </span><span class="kd">string</span>
<span class="p">}</span></code></pre></div>

Fields | &nbsp;
--|--
<span class="e-code">name</span> | <span class="e-code">string</span><br/>Resource name of the phone number. It must match the pattern `phoneNumbers/*`
<span class="e-code">phoneNumber</span> | <span class="e-code">string</span><br/>The phone number, in +E164 format.
<span class="e-code">capabilities[]</span> | <span class="e-code">enum ([PhoneNumberCapability](#phonenumberphonenumbercapability))</span><br/>The capabilities of the phone number.
<span class="e-code">sku</span> | <span class="e-code">string</span><br/>The SKU that will be used to bill the phone number for the monthly service charge. In the form `services/*/skus/*`. Output only.
<span class="e-code">activationSku</span> | <span class="e-code">string</span><br/>The SKU that will be used to bill the phone number for the once-off activation charge. In the form `services/*/skus/*`. If not set, there is no activation charge. Output only.
<span class="e-code">numberType</span> | <span class="e-code">enum ([PhoneNumberType](#phonenumberphonenumbertype))</span><br/>The type of phone number.
<span class="e-code">countryCode</span> | <span class="e-code">string</span><br/>The alpha-2 country code that identifies the country associated with the phone number. 

## PhoneNumber.PhoneNumberCapability

A capability of a phone number.

Enums | &nbsp;
--|--
<span class="e-code">PHONE_NUMBER_CAPABILITY_UNSPECIFIED</span> | Unspecified phone number capability.
<span class="e-code">SMS</span> | The phone number is capable of SMS.
<span class="e-code">MMS</span> | The phone number is capable of MMS.
<span class="e-code">VOICE</span> | The phone number is capable of voice.

## PhoneNumber.PhoneNumberType

The type of phone number.

Enums | &nbsp;
--|--
<span class="e-code">PHONE_NUMBER_TYPE_UNSPECIFIED</span> | Unspecified phone number type.
<span class="e-code">LOCAL</span> | The phone number is a local phone number and corresponds to a specific geography within a country.
<span class="e-code">NATIONAL</span> | The phone number is a national phone number and is independent of geography within a country.
<span class="e-code">MOBILE</span> | The phone number is a mobile-only phone number and is independent of geography within a country.
<span class="e-code">TOLL_FREE</span> | The phone number is a toll-free number, where the caller can call the number typically without any cost to the caller.
<span class="e-code">SHARED_RATE</span> | The phone number is a shared-rate number, where both the caller and holder of the phone number both typically share in the cost of calls to the phone number.

## Methods

Methods | &nbsp;
--|--
<span class="e-code">[search](/docs/phone-numbers/api-reference/rest/v1beta1/phoneNumbers/search/)</span> | <span class="e-code">GET /v1beta1/phoneNumbers:search</span><br/>Searches available phone numbers with the specified filters.<br/><br/>Search returns phone numbers sorted by create_time descending.<br/><br/>The caller must be authenticated.

