Incoming Phone Number Assigned Add-ons Extensions Subresource
This endpoint allows Add-on Listing users to fetch an Extension or view a list of Extensions associated with an assigned Add-on Listing of a Twilio phone number.
When an Add-on Listing is assigned to a Twilio phone number, it is only invoked for communications associated with that phone number rather than the entire Account.
Info
This API only supports Add-on Listings that are in General Availability (GA) or Beta state. Listings that are labeled as Coming Soon or Developer Preview are not accessible via the API and must be managed in the Console.
Property nameTypeRequiredDescriptionChild properties
The unique string that that we created to identify the resource.
Pattern: ^XF[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
account_sidSID<AC>Optional The SID of the Account that created the resource.
Pattern: ^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
resource_sidSID<PN>Optional The SID of the Phone Number to which the Add-on is assigned.
Pattern: ^PN[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
assigned_add_on_sidSID<XE>Optional The SID that uniquely identifies the assigned Add-on installation.
Pattern: ^XE[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
friendly_namestringOptional The string that you assigned to describe the resource.
product_namestringOptional A string that you assigned to describe the Product this Extension is used within.
unique_namestringOptional An application-defined string that uniquely identifies the resource. It can be used in place of the resource's sid
in the URL to address the resource.
The URI of the resource, relative to https://api.twilio.com
.
Whether the Extension will be invoked.
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions/{Sid}.json
Property nameTypeRequiredPIIDescription
AccountSidSID<AC>required The SID of the Account that created the resource to fetch.
Pattern: ^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
ResourceSidSID<PN>required The SID of the Phone Number to which the Add-on is assigned.
Pattern: ^PN[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
AssignedAddOnSidSID<XE>required The SID that uniquely identifies the assigned Add-on installation.
Pattern: ^XE[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The Twilio-provided string that uniquely identifies the resource to fetch.
Pattern: ^XF[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
_20// Download the helper library from https://www.twilio.com/docs/node/install
_20const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_20// Find your Account SID and Auth Token at twilio.com/console
_20// and set the environment variables. See http://twil.io/secure
_20const accountSid = process.env.TWILIO_ACCOUNT_SID;
_20const authToken = process.env.TWILIO_AUTH_TOKEN;
_20const client = twilio(accountSid, authToken);
_20async function fetchIncomingPhoneNumberAssignedAddOnExtension() {
_20 const extension = await client
_20 .incomingPhoneNumbers("PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_20 .assignedAddOns("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_20 .extensions("XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_20 console.log(extension.sid);
_20fetchIncomingPhoneNumberAssignedAddOnExtension();
_11 "sid": "XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_11 "assigned_add_on_sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_11 "resource_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_11 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_11 "friendly_name": "Incoming Voice Call",
_11 "product_name": "Programmable Voice",
_11 "unique_name": "voice-incoming",
_11 "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions/XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions.json
Property nameTypeRequiredPIIDescription
AccountSidSID<AC>required The SID of the Account that created the resources to read.
Pattern: ^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
ResourceSidSID<PN>required The SID of the Phone Number to which the Add-on is assigned.
Pattern: ^PN[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
AssignedAddOnSidSID<XE>required The SID that uniquely identifies the assigned Add-on installation.
Pattern: ^XE[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
Property nameTypeRequiredPIIDescription
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Minimum: 1
Maximum: 1000
The page index. This value is simply for client state.
Minimum: 0
The page token. This is provided by the API.
_19// Download the helper library from https://www.twilio.com/docs/node/install
_19const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19// Find your Account SID and Auth Token at twilio.com/console
_19// and set the environment variables. See http://twil.io/secure
_19const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19const authToken = process.env.TWILIO_AUTH_TOKEN;
_19const client = twilio(accountSid, authToken);
_19async function listIncomingPhoneNumberAssignedAddOnExtension() {
_19 const extensions = await client
_19 .incomingPhoneNumbers("PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_19 .assignedAddOns("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_19 .extensions.list({ limit: 20 });
_19 extensions.forEach((e) => console.log(e.sid));
_19listIncomingPhoneNumberAssignedAddOnExtension();
_23 "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions.json?PageSize=50&Page=0",
_23 "next_page_uri": null,
_23 "previous_page_uri": null,
_23 "sid": "XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23 "assigned_add_on_sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23 "resource_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23 "friendly_name": "Incoming Voice Call",
_23 "product_name": "Programmable Voice",
_23 "unique_name": "voice-incoming",
_23 "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions/XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
_23 "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions.json?PageSize=50&Page=0"