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.
Call Forwarding is only available for phone numbers owned by major carriers in the United Kingdom.
Call Forwarding requires carrier registration and approval. 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.
Make a GET /v2/PhoneNumbers/{PhoneNumber}
request with the Fields=call_forwarding
query parameter.
1curl -X GET "https://lookups.twilio.com/v2/PhoneNumbers/{PhoneNumber}?Fields=call_forwarding" \ -u2$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
A Call Forwarding request returns the following properties.
Property | Description |
---|---|
CallForwardingStatus | A Boolean indicating whether unconditional call forwarding is set for the requested mobile phone number. |
ErrorCode | The error code, if any, associated with your 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 and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchPhoneNumber() {11const phoneNumber = await client.lookups.v212.phoneNumbers("+447772000001")13.fetch({ fields: "call_forwarding" });1415console.log(phoneNumber.callForwarding);16}1718fetchPhoneNumber();
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": null13},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}