curl -X POST "https://developer.encrata.com/api/lookup/phone/voip" \
-H "Authorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"phone": "+14155552671", "mode": "current"}'
{
"success": true,
"result": {
"phone": "+14155552671",
"valid": true,
"is_voip": true,
"voip_status": "voip",
"line_type": "voip",
"original_line_type": "mobile",
"carrier": "T-Mobile USA, Inc.",
"current_carrier": "Bandwidth.com",
"ported": true,
"region": "California",
"country": "United States",
"country_code": "US",
"timezone": ["America/Los_Angeles"],
"mode": "current",
"cached": false,
"credits": 2
},
"message": "VoIP check complete."
}
{
"success": true,
"result": {
"phone": "+442071838750",
"valid": true,
"is_voip": false,
"voip_status": "not_voip",
"line_type": "fixed_line",
"carrier": "BT",
"region": "London",
"country": "United Kingdom",
"country_code": "GB",
"timezone": ["Europe/London"],
"mode": "static",
"cached": false,
"credits": 2
},
"message": "VoIP check complete."
}
{
"success": true,
"result": {
"phone": "+12015550123",
"valid": true,
"is_voip": false,
"voip_status": "unknown",
"line_type": "fixed_line_or_mobile",
"country": "United States",
"country_code": "US",
"mode": "static",
"cached": false,
"credits": 0
},
"message": "VoIP check complete."
}
{
"success": false,
"result": { "code": "validation_failed" },
"message": "Mode must be \"static\" or \"current\"."
}
Phone
Phone VoIP
Check if a phone number is a VoIP line, including numbers ported onto a VoIP carrier. 2 credits, free when the answer is unknown.
POST
/
api
/
lookup
/
phone
/
voip
curl -X POST "https://developer.encrata.com/api/lookup/phone/voip" \
-H "Authorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"phone": "+14155552671", "mode": "current"}'
{
"success": true,
"result": {
"phone": "+14155552671",
"valid": true,
"is_voip": true,
"voip_status": "voip",
"line_type": "voip",
"original_line_type": "mobile",
"carrier": "T-Mobile USA, Inc.",
"current_carrier": "Bandwidth.com",
"ported": true,
"region": "California",
"country": "United States",
"country_code": "US",
"timezone": ["America/Los_Angeles"],
"mode": "current",
"cached": false,
"credits": 2
},
"message": "VoIP check complete."
}
{
"success": true,
"result": {
"phone": "+442071838750",
"valid": true,
"is_voip": false,
"voip_status": "not_voip",
"line_type": "fixed_line",
"carrier": "BT",
"region": "London",
"country": "United Kingdom",
"country_code": "GB",
"timezone": ["Europe/London"],
"mode": "static",
"cached": false,
"credits": 2
},
"message": "VoIP check complete."
}
{
"success": true,
"result": {
"phone": "+12015550123",
"valid": true,
"is_voip": false,
"voip_status": "unknown",
"line_type": "fixed_line_or_mobile",
"country": "United States",
"country_code": "US",
"mode": "static",
"cached": false,
"credits": 0
},
"message": "VoIP check complete."
}
{
"success": false,
"result": { "code": "validation_failed" },
"message": "Mode must be \"static\" or \"current\"."
}
Phone VoIP answers one question: is this number a VoIP line? VoIP numbers are
cheap to get in bulk, so they are common in SMS fraud and fake sign-ups.
In
POST /api/lookup/phone/voip
Requires an Encrata API key in the Authorization header.
Request
The phone number in E.164 format, for example
+14155552671. You can send it
as query instead.How to check the line.
Any other value returns
| Value | Checks | Use when |
|---|---|---|
static | The line type the number range was issued as. | You want a fast, broad check. |
current | The carrier and line type the number uses today, after porting. Falls back to static when that can’t be resolved. Most precise for US numbers. | You need to catch a mobile number moved onto a VoIP carrier. |
400.Example request
curl -X POST "https://developer.encrata.com/api/lookup/phone/voip" \
-H "Authorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"phone": "+14155552671", "mode": "current"}'
import requests
resp = requests.post(
"https://developer.encrata.com/api/lookup/phone/voip",
headers={"Authorization": "Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},
json={"phone": "+14155552671", "mode": "current"},
)
print(resp.json())
const resp = await fetch("https://developer.encrata.com/api/lookup/phone/voip", {
method: "POST",
headers: {
Authorization: "Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
},
body: JSON.stringify({ phone: "+14155552671", mode: "current" }),
});
const data = await resp.json();
How the answer is decided
voip_status | When |
|---|---|
voip | The line type is voip. |
not_voip | The line type is mobile, fixed_line, or toll_free. |
unknown | The number is invalid, or its range can be either landline or mobile (fixed_line_or_mobile), or the line type is anything else. |
current mode, the line type the number uses today wins over the one it was
issued as. A mobile number ported to a VoIP carrier comes back as voip.
Response
The lookup is inresult. message is VoIP check complete.
true when the number is valid. An invalid number is always
voip_status: "unknown" and is free.voip, not_voip, or unknown. See
How the answer is decided.The line type the answer used:
mobile, fixed_line, voip, toll_free,
fixed_line_or_mobile, short_code, or emergency.Credits charged:
2, or 0 when the number is invalid, the answer is
unknown, or the check is a free repeat.Errors
See Phone Lookup errors. VoIP adds these:| Status | result.code | When |
|---|---|---|
400 | validation_failed | mode isn’t static or current. |
400 | validation_failed | The number couldn’t be checked. The message asks for international format, for example +14155550123. |
402 | insufficient_credits | You have fewer than 2 credits and the check isn’t a free repeat. |
Credits
Each check costs 2 credits. You pay nothing when the number is invalid or the answer isunknown. Checking the same number in the same mode again within
6 months is free (credits: 0). static and current are billed separately.
See Credits.
curl -X POST "https://developer.encrata.com/api/lookup/phone/voip" \
-H "Authorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"phone": "+14155552671", "mode": "current"}'
{
"success": true,
"result": {
"phone": "+14155552671",
"valid": true,
"is_voip": true,
"voip_status": "voip",
"line_type": "voip",
"original_line_type": "mobile",
"carrier": "T-Mobile USA, Inc.",
"current_carrier": "Bandwidth.com",
"ported": true,
"region": "California",
"country": "United States",
"country_code": "US",
"timezone": ["America/Los_Angeles"],
"mode": "current",
"cached": false,
"credits": 2
},
"message": "VoIP check complete."
}
{
"success": true,
"result": {
"phone": "+442071838750",
"valid": true,
"is_voip": false,
"voip_status": "not_voip",
"line_type": "fixed_line",
"carrier": "BT",
"region": "London",
"country": "United Kingdom",
"country_code": "GB",
"timezone": ["Europe/London"],
"mode": "static",
"cached": false,
"credits": 2
},
"message": "VoIP check complete."
}
{
"success": true,
"result": {
"phone": "+12015550123",
"valid": true,
"is_voip": false,
"voip_status": "unknown",
"line_type": "fixed_line_or_mobile",
"country": "United States",
"country_code": "US",
"mode": "static",
"cached": false,
"credits": 0
},
"message": "VoIP check complete."
}
{
"success": false,
"result": { "code": "validation_failed" },
"message": "Mode must be \"static\" or \"current\"."
}
Was this page helpful?