Line Type Override
Make a Line Type Override request to manually update the type for a specific phone number when the Line Type Intelligence response is incomplete or inaccurate. This ensures incorrect detection doesn't affect your workflows.
Info
You can only update the type value under the line_type_intelligence data structure. The Line Type Override request doesn't support overrides for other fields or data types.
- Overrides persist and apply to all future Lookup requests for the same phone number on your account.
- Overrides apply only to the region where you created them. For example, an override created in the
US1region only applies toUS1.
https://lookups.twilio.com/v2/PhoneNumbers/{PhoneNumber}/Overrides/line_type_intelligence
| Path parameter | Type | Description |
|---|---|---|
PhoneNumber | string | The E.164-formatted phone number to override (for example, +1419929960) |
Note: To ensure data privacy, Twilio doesn't support unencrypted HTTP.
POST https://lookups.twilio.com/v2/PhoneNumbers/{PhoneNumber}/Overrides/line_type_intelligence
1{2"line_type": "nonFixedVoip",3"reason": "Customer has provided evidence that this is a non-fixed VoIP number."4}
| Name | Type | Required | Description |
|---|---|---|---|
line_type | string | Yes | The new type value for the provided phone number. This parameter accepts mobile, landline, tollFree, fixedVoip, nonFixedVoip, personal, premium, voicemail, sharedCost, uan, pager, and unknown. |
reason | string | No | The reason for the override. |
| Code | Description |
|---|---|
201 | Override successfully created |
422 | Unprocessable entity, such as unsupported field or value |
404 | Phone number not found |
409 | Override already exists with the same value |
500 | Internal server error |
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function createLookupPhoneNumberOverrides() {14const lookupOverride = await client.lookups.v215.lookupOverrides("+14159929960", "line_type_intelligence")16.create();1718console.log(lookupOverride.phoneNumber);19}2021createLookupPhoneNumberOverrides();
1{2"original_line_type": "fixedVoip",3"overridden_line_type": "nonFixedVoip",4"override_reason": "Customer has provided evidence that this is a non-fixed VoIP number.",5"override_timestamp": "2025-05-29T20:11:43Z",6"phone_number": "+14159929960"7}
GET https://lookups.twilio.com/v2/PhoneNumbers/{PhoneNumber}/Overrides/line_type_intelligence
| Code | Description |
|---|---|
200 | Override successfully retrieved |
404 | Phone number not found |
500 | Internal server error |
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function fetchLookupPhoneNumberOverrides() {14const lookupOverride = await client.lookups.v215.lookupOverrides("+14159929960", "line_type_intelligence")16.fetch();1718console.log(lookupOverride.phoneNumber);19}2021fetchLookupPhoneNumberOverrides();
1{2"original_line_type": "fixedVoip",3"overridden_line_type": "nonFixedVoip",4"override_reason": "Customer has provided evidence that this is a non-fixed VoIP number.",5"override_timestamp": "2025-05-29T20:11:43Z",6"phone_number": "+14159929960"7}
PUT https://lookups.twilio.com/v2/PhoneNumbers/{PhoneNumber}/Overrides/line_type_intelligence
1{2"line_type": "mobile",3"reason": "Customer has provided evidence that this is a mobile number."4}
| Name | Type | Required | Description |
|---|---|---|---|
line_type | string | Yes | The new type value for the provided phone number. Supported values are mobile, landline, tollFree, fixedVoip, nonFixedVoip, personal, premium, voicemail, sharedCost, uan, pager, and unknown. |
reason | string | No | The reason for the override. |
| Code | Description |
|---|---|
200 | Override successfully updated |
404 | Phone number not found |
500 | Internal server error |
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function updateLookupPhoneNumberOverrides() {14const lookupOverride = await client.lookups.v215.lookupOverrides("+14159929960", "line_type_intelligence")16.update({17line_type: "mobile",18});1920console.log(lookupOverride.phoneNumber);21}2223updateLookupPhoneNumberOverrides();
1{2"original_line_type": "fixedVoip",3"overridden_line_type": "mobile",4"override_reason": "",5"override_timestamp": "2025-07-04T20:30:00Z",6"phone_number": "+14159929960"7}
DELETE https://lookups.twilio.com/v2/PhoneNumbers/{PhoneNumber}/Overrides/line_type_intelligence
| Code | Description |
|---|---|
204 | Override removed |
404 | Override not found |
500 | Internal server error |
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function deleteLookupPhoneNumberOverrides() {14await client.lookups.v215.lookupOverrides("+14159929960", "line_type_intelligence")16.remove();17}1819deleteLookupPhoneNumberOverrides();
To test if an override has been applied to a phone number, make a Line Type Intelligence request.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function fetchPhoneNumber() {14const phoneNumber = await client.lookups.v215.phoneNumbers("+14159929960")16.fetch({ fields: "line_type_intelligence" });1718console.log(phoneNumber.lineTypeIntelligence);19}2021fetchPhoneNumber();
1{2"calling_country_code": "1",3"country_code": "US",4"phone_number": "+14159929960",5"national_format": "(415) 992-9960",6"valid": true,7"validation_errors": null,8"caller_name": null,9"sim_swap": null,10"call_forwarding": null,11"line_status": null,12"line_type_intelligence": {13"error_code": null,14"mobile_country_code": "240",15"mobile_network_code": "38",16"carrier_name": "Twilio - SMS/MMS-SVR",17"type": "mobile"18},19"identity_match": null,20"reassigned_number": null,21"sms_pumping_risk": null,22"phone_number_quality_score": null,23"pre_fill": null,24"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960"25}