Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

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 nameTypeRequiredDescriptionChild properties
sidSID<XF>Optional
Not PII

The unique string that that we created to identify the resource.

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

account_sidSID<AC>Optional

The SID of the Account that created the resource.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max 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: 34Max 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: 34Max length: 34

friendly_namestringOptional
PII MTL: 30 days

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.


uristringOptional

The URI of the resource, relative to https://api.twilio.com.


enabledbooleanOptional

Whether the Extension will be invoked.


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 Extension

fetch-an-extension page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_20
// Download the helper library from https://www.twilio.com/docs/node/install
_20
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_20
_20
// Find your Account SID and Auth Token at twilio.com/console
_20
// and set the environment variables. See http://twil.io/secure
_20
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_20
const authToken = process.env.TWILIO_AUTH_TOKEN;
_20
const client = twilio(accountSid, authToken);
_20
_20
async function fetchIncomingPhoneNumberAssignedAddOnExtension() {
_20
const extension = await client
_20
.incomingPhoneNumbers("PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_20
.assignedAddOns("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_20
.extensions("XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_20
.fetch();
_20
_20
console.log(extension.sid);
_20
}
_20
_20
fetchIncomingPhoneNumberAssignedAddOnExtension();

Output

_11
{
_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",
_11
"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
PageSizeintegerOptional

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

Minimum: 1Maximum: 1000

PageintegerOptional

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

Minimum: 0

PageTokenstringOptional

The page token. This is provided by the API.

List multiple Extensions

list-multiple-extensions page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_19
// Download the helper library from https://www.twilio.com/docs/node/install
_19
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19
_19
// Find your Account SID and Auth Token at twilio.com/console
_19
// and set the environment variables. See http://twil.io/secure
_19
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19
const authToken = process.env.TWILIO_AUTH_TOKEN;
_19
const client = twilio(accountSid, authToken);
_19
_19
async function listIncomingPhoneNumberAssignedAddOnExtension() {
_19
const extensions = await client
_19
.incomingPhoneNumbers("PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_19
.assignedAddOns("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_19
.extensions.list({ limit: 20 });
_19
_19
extensions.forEach((e) => console.log(e.sid));
_19
}
_19
_19
listIncomingPhoneNumberAssignedAddOnExtension();

Output

_23
{
_23
"end": 0,
_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
"page": 0,
_23
"page_size": 50,
_23
"previous_page_uri": null,
_23
"extensions": [
_23
{
_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
"enabled": true,
_23
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions/XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
_23
}
_23
],
_23
"start": 0,
_23
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions.json?PageSize=50&Page=0"
_23
}


Rate this page: