Skip to contentSkip to navigationSkip to topbar
On this page

Call Forwarding


(warning)

Private Beta

Call Forwarding is in Private Beta. The information in this document might change as we add or update features before the product becomes Generally Available. Private Beta products don't have a Service Level Agreement (SLA).

Use Call Forwarding to check if a mobile phone number is unconditionally forwarding calls. This helps you identify numbers that might be at risk of fraud.


Coverage

coverage page anchor

Call Forwarding is only available for phone numbers owned by major carriers in the United Kingdom.

(information)

Info

Call Forwarding requires carrier registration and approval(link takes you to an external page). Once approved, Call Forwarding will be billed per request, even if no data is returned. Requests for unsupported carriers will return null but won't be charged. For additional pricing information, contact Sales(link takes you to an external page).


Make a GET /v2/PhoneNumbers/{PhoneNumber} request with the Fields=call_forwarding query parameter.

1
curl -X GET "https://lookups.twilio.com/v2/PhoneNumbers/{PhoneNumber}?Fields=call_forwarding" \ -u
2
$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

A Call Forwarding request returns the following properties.

PropertyDescription
CallForwardingStatusA Boolean indicating whether unconditional call forwarding is set for the requested mobile phone number.
ErrorCodeThe error code, if any, associated with your request.

Code examples and responses

code-examples-and-responses page anchor
Call Forwarding LookupLink to code sample: Call Forwarding Lookup
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchPhoneNumber() {
11
const phoneNumber = await client.lookups.v2
12
.phoneNumbers("+447772000001")
13
.fetch({ fields: "call_forwarding" });
14
15
console.log(phoneNumber.callForwarding);
16
}
17
18
fetchPhoneNumber();

Response

1
{
2
"calling_country_code": "44",
3
"country_code": "GB",
4
"phone_number": "+447772000001",
5
"national_format": "07772 000001",
6
"valid": true,
7
"validation_errors": null,
8
"caller_name": null,
9
"sim_swap": null,
10
"call_forwarding": {
11
"call_forwarding_status": true,
12
"error_code": null
13
},
14
"line_status": null,
15
"line_type_intelligence": null,
16
"identity_match": null,
17
"reassigned_number": null,
18
"sms_pumping_risk": null,
19
"phone_number_quality_score": null,
20
"pre_fill": null,
21
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+447772000001"
22
}