Validate and format a phone number, with optional data packages.
GET/PhoneNumbers/{PhoneNumber}
- Takes: Phone number
- Passive: the target is not contacted
- Cost: Basic lookup free; data packages are charged
Always returns formatting and validation. Package objects are null unless named in Fields. Identity fields are sensitive PII: send them only when identity_match is in use.
Path parameters
PhoneNumberE.164 or national format; URL-encode the plus sign as %2B
Query parameters
FieldsComma-separated data packages: validation, caller_name, sim_swap, call_forwarding, line_status, line_type_intelligence, identity_match, reassigned_number, sms_pumping_risk, phone_number_quality_score, pre_fill
CountryCodeISO 3166-1 alpha-2 country used to read a national-format number
FirstNameFor identity_match: first name
LastNameFor identity_match: last name
AddressLine1For identity_match: first address line
CityFor identity_match: city
PostalCodeFor identity_match: postal or ZIP code
DateOfBirthFor identity_match: YYYYMMDD
LastVerifiedDateFor reassigned_number: YYYYMMDD of the last consent or contact
Response fields · 14ShowHide
calling_country_code
International dialing prefix
country_code
ISO country code
phone_number
E.164 format
national_format
National format
valid
Whether the number is in a range a carrier can assign
validation_errors[]
Why the number is invalid, e.g. TOO_SHORT, TOO_LONG, INVALID_COUNTRY_CODE
caller_name
CNAM caller name (US carriers only)
type
Line type such as mobile, landline, VoIP
carrier_name
Carrier name
last_sim_swap_date
Date of the last SIM change
call_forwarding_enabled
Unconditional call forwarding status
status
Status of a mobile line
sms_pumping_risk_score
SMS pumping risk score
url
Absolute URL of the resource
curl 'https://lookups.twilio.com/v2/PhoneNumbers/%2B14155550100' \
-u 'USERNAME:PASSWORD'{
"calling_country_code": "1",
"country_code": "US",
"phone_number": "+14155550100",
"national_format": "(415) 555-0100",
"valid": true,
"validation_errors": null,
"line_type_intelligence": {
"type": "mobile",
"carrier_name": "Example Carrier",
"mobile_country_code": "310",
"mobile_network_code": "000",
"error_code": null
},
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14155550100"
}