> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt

# PhoneNumber

## Functions

### getInfo

Get the phone number info.

```ts
getInfo(number: string, country?: string): Info
```

**Parameters**

**`number`** `string` — required

---

**`country`** `string`

---

## Types

### Info

**`error`** `string`

*optional*

Optional. Error string. Possible values are: INVALID_COUNTRY_CODE, NOT_A_NUMBER, TOO_SHORT_AFTER_IDD, TOO_SHORT_NSN, TOO_LONG_NSN

---

**`isPossibleNumber`** `boolean`

Whether the number is possible in specified country (just by analyzing length information)

---

**`isValidNumber`** `boolean`

Whether the number is valid in specified country

---

**`isValidNumberForRegion`** `boolean`

Whether the number is valid in detected region

---

**`location`** `string`

The phone number's city, state and country. If the city (or state) is unavailable, only state and country (or just country) is shown

---

**`number`** `string`

Number in international E.164 format, starting with +

---

**`numberType`** `string`

Number type, one of: FIXED_LINE, MOBILE, FIXED_LINE_OR_MOBILE, TOLL_FREE, PREMIUM_RATE, SHARED_COST, VOIP, PERSONAL_NUMBER, PAGER, UAN, VOICEMAIL, UNKNOWN

---

**`region`** `string`

2-letter country code of specified phone number (ISO 3166-1)

---