Fetch phone number
Query information on a phone number so that you can make a trusted interaction with your user
Path parameters
-
The phone number to lookup in E.164 or national format. Default country code is +1 (North America).
Query parameters
-
A comma-separated list of fields to return. Possible values are 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.
-
The country code used if the phone number provided is in national format.
-
User’s first name. This query parameter is only used (optionally) for identity_match package requests.
-
User’s last name. This query parameter is only used (optionally) for identity_match package requests.
-
User’s first address line. This query parameter is only used (optionally) for identity_match package requests.
-
User’s second address line. This query parameter is only used (optionally) for identity_match package requests.
-
User’s city. This query parameter is only used (optionally) for identity_match package requests.
-
User’s country subdivision, such as state, province, or locality. This query parameter is only used (optionally) for identity_match package requests.
-
User’s postal zip code. This query parameter is only used (optionally) for identity_match package requests.
-
User’s country, up to two characters. This query parameter is only used (optionally) for identity_match package requests.
-
User’s national ID, such as SSN or Passport ID. This query parameter is only used (optionally) for identity_match package requests.
-
User’s date of birth, in YYYYMMDD format. This query parameter is only used (optionally) for identity_match package requests.
-
The date you obtained consent to call or text the end-user of the phone number or a date on which you are reasonably certain that the end-user could still be reached at that number. This query parameter is only used (optionally) for reassigned_number package requests.
-
The unique identifier associated with a verification process through verify API. This query parameter is only used (optionally) for pre_fill package requests.
-
The optional partnerSubId parameter to provide context for your sub-accounts, tenantIDs, sender IDs or other segmentation, enhancing the accuracy of the risk analysis.
curl \
--request GET 'https://lookups.twilio.com/v2/PhoneNumbers/{PhoneNumber}' \
--user "username:password"
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960",
"valid": true,
"pre_fill": null,
"sim_swap": null,
"caller_name": null,
"line_status": null,
"country_code": "US",
"phone_number": "+14159929960",
"identity_match": null,
"call_forwarding": null,
"national_format": "(415) 992-9960",
"sms_pumping_risk": null,
"reassigned_number": null,
"validation_errors": null,
"calling_country_code": "1",
"line_type_intelligence": null,
"phone_number_quality_score": null
}
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+141599299600",
"valid": false,
"pre_fill": null,
"sim_swap": null,
"caller_name": null,
"line_status": null,
"country_code": null,
"phone_number": "+141599299600",
"identity_match": null,
"call_forwarding": null,
"national_format": null,
"sms_pumping_risk": null,
"reassigned_number": null,
"validation_errors": [
"TOO_LONG"
],
"calling_country_code": null,
"line_type_intelligence": null,
"phone_number_quality_score": null
}
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960",
"valid": true,
"pre_fill": null,
"sim_swap": null,
"caller_name": {
"error_code": null,
"caller_name": "Sergio Suarez",
"caller_type": "CONSUMER"
},
"line_status": null,
"country_code": "US",
"phone_number": "+14159929960",
"identity_match": null,
"call_forwarding": null,
"national_format": "(415) 992-9960",
"sms_pumping_risk": null,
"reassigned_number": null,
"validation_errors": null,
"calling_country_code": "1",
"line_type_intelligence": null,
"phone_number_quality_score": null
}
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+447772000001",
"valid": true,
"pre_fill": null,
"sim_swap": {
"error_code": null,
"carrier_name": "Vodafone UK",
"last_sim_swap": {
"swapped_period": "PT48H",
"swapped_in_period": true,
"last_sim_swap_date": "2020-04-27T10:18:50Z"
},
"mobile_country_code": "276",
"mobile_network_code": "02"
},
"caller_name": null,
"line_status": null,
"country_code": "GB",
"phone_number": "+447772000001",
"identity_match": null,
"call_forwarding": null,
"national_format": "07772 000001",
"sms_pumping_risk": null,
"reassigned_number": null,
"validation_errors": null,
"calling_country_code": "44",
"line_type_intelligence": null,
"phone_number_quality_score": null
}
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+447772000001",
"valid": true,
"pre_fill": null,
"sim_swap": {
"error_code": null,
"carrier_name": "Vodafone UK",
"last_sim_swap": {
"swapped_period": "PT24H",
"swapped_in_period": true,
"last_sim_swap_date": null
},
"mobile_country_code": "276",
"mobile_network_code": "02"
},
"caller_name": null,
"line_status": null,
"country_code": "GB",
"phone_number": "+447772000001",
"identity_match": null,
"call_forwarding": null,
"national_format": "07772 000001",
"sms_pumping_risk": null,
"reassigned_number": null,
"validation_errors": null,
"calling_country_code": "44",
"line_type_intelligence": null,
"phone_number_quality_score": null
}
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+447772000001",
"valid": true,
"pre_fill": null,
"sim_swap": {
"error_code": null,
"carrier_name": "Vodafone UK",
"last_sim_swap": {
"swapped_period": "PT24H",
"swapped_in_period": false,
"last_sim_swap_date": null
},
"mobile_country_code": "276",
"mobile_network_code": "02"
},
"caller_name": null,
"line_status": null,
"country_code": "GB",
"phone_number": "+447772000001",
"identity_match": null,
"call_forwarding": null,
"national_format": "07772 000001",
"sms_pumping_risk": null,
"reassigned_number": null,
"validation_errors": null,
"calling_country_code": "44",
"line_type_intelligence": null,
"phone_number_quality_score": null
}
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+447772000001",
"valid": true,
"pre_fill": null,
"sim_swap": null,
"caller_name": null,
"line_status": null,
"country_code": "GB",
"phone_number": "+447772000001",
"identity_match": null,
"call_forwarding": {
"error_code": null,
"call_forwarding_status": true
},
"national_format": "07772 000001",
"sms_pumping_risk": null,
"reassigned_number": null,
"validation_errors": null,
"calling_country_code": "44",
"line_type_intelligence": null,
"phone_number_quality_score": null
}
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+447772000001",
"valid": true,
"pre_fill": null,
"sim_swap": {
"error_code": null,
"carrier_name": "Vodafone UK",
"last_sim_swap": {
"swapped_period": "PT24H",
"swapped_in_period": true,
"last_sim_swap_date": "2020-11-05T20:52:09.322Z"
},
"mobile_country_code": "276",
"mobile_network_code": "02"
},
"caller_name": null,
"line_status": null,
"country_code": "GB",
"phone_number": "+447772000001",
"identity_match": null,
"call_forwarding": {
"error_code": null,
"call_forwarding_status": true
},
"national_format": "07772 000001",
"sms_pumping_risk": null,
"reassigned_number": null,
"validation_errors": null,
"calling_country_code": "44",
"line_type_intelligence": null,
"phone_number_quality_score": null
}
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+447772000001",
"valid": true,
"pre_fill": null,
"sim_swap": null,
"caller_name": null,
"line_status": {
"status": "active",
"error_code": null
},
"country_code": "GB",
"phone_number": "+447772000001",
"identity_match": null,
"call_forwarding": null,
"national_format": "07772 000001",
"sms_pumping_risk": null,
"reassigned_number": null,
"validation_errors": null,
"calling_country_code": "44",
"line_type_intelligence": null,
"phone_number_quality_score": null
}
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+447772000001",
"valid": true,
"pre_fill": null,
"sim_swap": null,
"caller_name": null,
"line_status": {
"status": "inactive",
"error_code": null
},
"country_code": "GB",
"phone_number": "+447772000001",
"identity_match": null,
"call_forwarding": null,
"national_format": "07772 000001",
"sms_pumping_risk": null,
"reassigned_number": null,
"validation_errors": null,
"calling_country_code": "44",
"line_type_intelligence": null,
"phone_number_quality_score": null
}
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960",
"valid": true,
"pre_fill": null,
"sim_swap": null,
"caller_name": null,
"line_status": null,
"country_code": "US",
"phone_number": "+14159929960",
"identity_match": null,
"call_forwarding": null,
"national_format": "(415) 992-9960",
"sms_pumping_risk": null,
"reassigned_number": null,
"validation_errors": null,
"calling_country_code": "1",
"line_type_intelligence": {
"type": "nonFixedVoip",
"error_code": null,
"carrier_name": "Twilio - SMS/MMS-SVR",
"mobile_country_code": "240",
"mobile_network_code": "38"
},
"phone_number_quality_score": null
}
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960",
"valid": true,
"pre_fill": null,
"sim_swap": null,
"caller_name": null,
"line_status": null,
"country_code": "US",
"phone_number": "+14159929960",
"identity_match": {
"city_match": "no_match",
"error_code": null,
"state_match": "high_partial_match",
"error_message": null,
"summary_score": 90,
"last_name_match": "high_partial_match",
"first_name_match": "exact_match",
"national_id_match": "exact_match",
"postal_code_match": "no_data_available",
"address_lines_match": "no_match",
"date_of_birth_match": "exact_match",
"address_country_match": "exact_match"
},
"call_forwarding": null,
"national_format": "(415) 992-9960",
"sms_pumping_risk": null,
"reassigned_number": null,
"validation_errors": [],
"calling_country_code": "1",
"line_type_intelligence": null,
"phone_number_quality_score": null
}
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960",
"valid": true,
"pre_fill": null,
"sim_swap": null,
"caller_name": null,
"line_status": null,
"country_code": "US",
"phone_number": "+14159929960",
"identity_match": null,
"call_forwarding": null,
"national_format": "(415) 992-9960",
"sms_pumping_risk": {
"error_code": null,
"number_blocked": false,
"number_blocked_date": null,
"carrier_risk_category": "moderate",
"sms_pumping_risk_score": 61,
"number_blocked_last_3_months": null
},
"reassigned_number": null,
"validation_errors": [],
"calling_country_code": "1",
"line_type_intelligence": null,
"phone_number_quality_score": null
}
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960",
"valid": true,
"pre_fill": null,
"sim_swap": null,
"caller_name": null,
"line_status": null,
"country_code": "US",
"phone_number": "+14159929960",
"identity_match": null,
"call_forwarding": null,
"national_format": "(415) 992-9960",
"sms_pumping_risk": null,
"reassigned_number": {
"error_code": null,
"last_verified_date": "2020-12-27",
"is_number_reassigned": "yes"
},
"validation_errors": [],
"calling_country_code": "1",
"line_type_intelligence": null,
"phone_number_quality_score": null
}
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960",
"valid": true,
"pre_fill": null,
"sim_swap": null,
"caller_name": null,
"line_status": null,
"country_code": "US",
"phone_number": "+14159929960",
"identity_match": null,
"call_forwarding": null,
"national_format": "(415) 992-9960",
"sms_pumping_risk": null,
"reassigned_number": {
"error_code": null,
"last_verified_date": "2019-09-24",
"is_number_reassigned": "no"
},
"validation_errors": [],
"calling_country_code": "1",
"line_type_intelligence": null,
"phone_number_quality_score": null
}
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960",
"valid": true,
"pre_fill": null,
"sim_swap": null,
"caller_name": null,
"line_status": null,
"country_code": "US",
"phone_number": "+14159929960",
"identity_match": null,
"call_forwarding": null,
"national_format": "(415) 992-9960",
"sms_pumping_risk": null,
"reassigned_number": {
"error_code": null,
"last_verified_date": "2021-12-24",
"is_number_reassigned": "no_data_available"
},
"validation_errors": [],
"calling_country_code": "1",
"line_type_intelligence": null,
"phone_number_quality_score": null
}
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960",
"valid": true,
"pre_fill": null,
"sim_swap": null,
"caller_name": null,
"line_status": null,
"country_code": "US",
"phone_number": "+14159929960",
"identity_match": null,
"call_forwarding": null,
"national_format": "(415) 992-9960",
"sms_pumping_risk": null,
"reassigned_number": null,
"validation_errors": [],
"calling_country_code": "1",
"line_type_intelligence": null,
"phone_number_quality_score": {
"error_code": null,
"quality_score": 0,
"quality_category": "low",
"carrier_risk_score": 17,
"velocity_risk_score": 0,
"carrier_risk_category": "low",
"velocity_risk_category": "low",
"disposable_phone_risk_score": 13,
"disposable_phone_risk_category": "low"
}
}
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960",
"valid": true,
"pre_fill": {
"state": "WA",
"last_name": "Doe",
"error_code": null,
"first_name": "John",
"postal_code": "98117",
"address_line": "321 Main Street",
"country_code": "US"
},
"sim_swap": null,
"caller_name": null,
"line_status": null,
"country_code": "US",
"phone_number": "+14159929960",
"identity_match": null,
"call_forwarding": null,
"national_format": "(415) 992-9960",
"sms_pumping_risk": null,
"reassigned_number": null,
"validation_errors": [],
"calling_country_code": "1",
"line_type_intelligence": null,
"phone_number_quality_score": null
}
{
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960",
"valid": true,
"pre_fill": null,
"sim_swap": null,
"caller_name": null,
"line_status": null,
"country_code": "US",
"phone_number": "+14159929960",
"identity_match": null,
"call_forwarding": null,
"national_format": "(415) 992-9960",
"sms_pumping_risk": {
"error_code": null,
"number_blocked": false,
"number_blocked_date": null,
"carrier_risk_category": "moderate",
"sms_pumping_risk_score": 61,
"number_blocked_last_3_months": null
},
"reassigned_number": null,
"validation_errors": [],
"calling_country_code": "1",
"line_type_intelligence": null,
"phone_number_quality_score": null
}