PhoneNumberLookupResultModel
Model returned from a phone number validation.
| Name | Description | Type | Additional information |
|---|---|---|---|
| IsValid |
True when Twilio reports the number as valid. |
boolean |
None. |
| Outcome |
Why the number is (in)valid: "valid", "invalidFormat" (rejected locally, no Twilio call was made - fix the input), or "invalidNumber" (well-formed, but Twilio reports it invalid). |
string |
None. |
| FormatError | string |
None. |
|
| PhoneNumber |
The E.164 number that was validated. |
string |
None. |
| NationalFormat |
The national-format number from Twilio (SPE-326). Omitted when Twilio did not return one. |
string |
None. |
| CanonicalE164 |
Twilio's canonical E.164 form (SPE-349). Omitted when Twilio did not return one. |
string |
None. |
| Type |
The validation type this result is for ("basic" or "lineType"), echoing the request so the meaning of is unambiguous. |
string |
None. |
| LineType |
Line type (mobile/landline/voip). Omitted from the response entirely unless "lineType" was requested and Twilio returned a value. |
string |
None. |
| CarrierName |
Carrier name (SPE-348). Omitted unless "lineType" was requested and returned. |
string |
None. |
| MobileCountryCode |
Mobile country code (SPE-348). Omitted unless "lineType" was requested and returned. |
string |
None. |
| MobileNetworkCode |
Mobile network code (SPE-348). Omitted unless "lineType" was requested and returned. |
string |
None. |
| LineTypeErrorCode |
line_type_intelligence error_code (SPE-348). Omitted when there was no error. |
integer |
None. |
| ErrorCode |
Twilio API-level error code on a failed lookup (SPE-326 AC4). Omitted on success. |
integer |
None. |
| ErrorMessage |
Twilio API-level error message on a failed lookup (SPE-326 AC4). Omitted on success. |
string |
None. |
| ValidatedUtc |
When the returned data was validated (UTC): the basic validation date for a "basic" request, the line-type validation date for a "lineType" request. |
date |
None. |
| FromCache |
True when served from the cache with no Twilio call. |
boolean |
None. |