Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

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.

(information)

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.


Extension Properties

extension-properties page anchor
Property nameTypeRequiredPIIDescriptionChild properties
endinteger

Optional

Not PII

firstPageUristring<uri>

Optional


nextPageUristring<uri>

Optional


pageinteger

Optional


pageSizeinteger

Optional


previousPageUristring<uri>

Optional


startinteger

Optional


uristring<uri>

Optional


extensionsarray[object]

Optional


Fetch an instance of an Extension for the Assigned Add-on

fetch-an-instance-of-an-extension-for-the-assigned-add-on page anchor

GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions/{Sid}.json

Path parameters

path-parameters page anchor
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: 34Max 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: 34Max length: 34

assignedAddOnSidSID<XE>
required

The SID that uniquely identifies the assigned Add-on installation.

Pattern: ^XE[0-9a-fA-F]{32}$Min length: 34Max length: 34

sidSID<XF>
required

The Twilio-provided string that uniquely identifies the resource to fetch.

Pattern: ^XF[0-9a-fA-F]{32}$Min length: 34Max length: 34
Fetch an instance of an Extension for the Assigned Add-onLink to code sample: Fetch an instance of an Extension for the Assigned Add-on
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 fetchIncomingPhoneNumberAssignedAddOnExtension() {
11
const extension = await client
12
.incomingPhoneNumbers("PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.assignedAddOns("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
14
.extensions("XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
15
.fetch();
16
17
console.log(extension.sid);
18
}
19
20
fetchIncomingPhoneNumberAssignedAddOnExtension();

Response

Note about this response
1
{
2
"sid": "XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"assigned_add_on_sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"resource_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"friendly_name": "Incoming Voice Call",
7
"product_name": "Programmable Voice",
8
"unique_name": "voice-incoming",
9
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions/XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
10
"enabled": true
11
}

Retrieve a list of Extensions for the Assigned Add-on

retrieve-a-list-of-extensions-for-the-assigned-add-on page anchor

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: 34Max 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: 34Max length: 34

assignedAddOnSidSID<XE>
required

The SID that uniquely identifies the assigned Add-on installation.

Pattern: ^XE[0-9a-fA-F]{32}$Min length: 34Max length: 34
Property nameTypeRequiredPIIDescription
pageSizeinteger<int64>

Optional

How many resources to return in each list page. The default is 50, and the maximum is 1000.

Minimum: 1Maximum: 1000

pageinteger

Optional

The page index. This value is simply for client state.

Minimum: 0

pageTokenstring

Optional

The page token. This is provided by the API.

Retrieve a list of Extensions for the Assigned Add-onLink to code sample: Retrieve a list of Extensions for the Assigned Add-on
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 listIncomingPhoneNumberAssignedAddOnExtension() {
11
const extensions = await client
12
.incomingPhoneNumbers("PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.assignedAddOns("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
14
.extensions.list({ limit: 20 });
15
16
extensions.forEach((e) => console.log(e.end));
17
}
18
19
listIncomingPhoneNumberAssignedAddOnExtension();

Response

Note about this response
1
{
2
"end": 0,
3
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions.json?PageSize=50&Page=0",
4
"next_page_uri": null,
5
"page": 0,
6
"page_size": 50,
7
"previous_page_uri": null,
8
"extensions": [
9
{
10
"sid": "XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
11
"assigned_add_on_sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
12
"resource_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
13
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
14
"friendly_name": "Incoming Voice Call",
15
"product_name": "Programmable Voice",
16
"unique_name": "voice-incoming",
17
"enabled": true,
18
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions/XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
19
}
20
],
21
"start": 0,
22
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions.json?PageSize=50&Page=0"
23
}