Latest Legacy

The Phone Number object

Attributes

number string

Phone number that can be purchased.

prefix string

The prefix of the number. This is the area code.

city string

The city of the number. This can be null if the number is national.

country string

The country of the number.

region string

The region (city and country) of the number.

rate_center string

Rate center is available only for US and Canada numbers.

lata string

The local access and transport area of the phone number. This attribute is null for all countries except the US and Canada.

type string

The type of the phone number can be fixed, mobile, or toll-free.

sub_type string

The subtype of the phone number can be fixed, mobile, toll-free, national, or local.

local and national numbers are subtypes of fixed numbers.

setup_rate string

The one-time setup fee for the number, in USD.

monthly_rental_rate string

The monthly recurring rental fee for the number, in USD. The monthly fee is billed at the start of each month. If the number is purchased in the middle of a month, the rental fee is prorated and billed at that time.

sms_enabled boolean

Indicates whether the phone number can receive SMS messages.

sms_rate string

The cost (per message) of receiving an SMS message on the number, in USD.

mms_enabled boolean

Indicates whether the phone number can receive MMS messages.

mms_rate string

The cost (per message) of receiving an MMS message on the number, in USD.

voice_enabled boolean

Indicates whether the phone number can receive calls.

voice_rate string

The cost (per minute) of receiving a call on the number, in USD.

restriction string

Indicates the type of verification document required to activate the phone number after its purchase. Verification requirements differ for phone numbers from different countries. Possible values are:

  • city-address: An address proof within the city is required.

  • country-address: An address proof within the phone number’s country is required.

  • terms-and-conditions: No verification document is required when buying the phone number. However, a local address proof should be furnished on request.

  • null: No verification document is required.

restriction_text string

A description of the verification documents required to activate the phone number.

resource_uri string

URI to the phone number resource.

object_typestring

Users can pass object_type as trunk.

Mandatory parameter when object_id is present.

Object_type will support trunk, phlo, and xml as values in the next release.

object_idstring

Users can pass trunk_id.

Mandatory parameter when object_type is present.

Object_id will support trunk_id, phlo_id, and xml_id as values in the next release

Response

{
  "number": "14155559186",
  "number_type": "local",
  "object_id": "17248282830499840",
  "object_type": "trunk",
  "prefix": "415",
  "city": "SAN FRANCISCO",
  "country": "UNITED STATES",
  "region": "United States",
  "rate_center": "SNFC CNTRL",
  "lata": 722,
  "type": "fixed",
  "sub_type": "local",
  "setup_rate": "0.00000",
  "monthly_rental_rate": "0.80000",
  "sms_enabled": true,
  "sms_rate": "0.00800",
  "voice_enabled": true,
  "voice_rate": "0.00500",
  "restriction": null,
  "restriction_text": null,
  "resource_uri": "/v1/Account/MA2025RK4E639VJFZAGV/PhoneNumber/14154009186/",
}