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

Incoming Phone Number Assigned Add-ons Subresource


This endpoint allows Add-on Listing users to see what installed Add-on Listings have been assigned to a given Twilio phone number. It also allows users to assign and unassign an installed Add-on Listing to an incoming phone number.

When an Add-on Listing is assigned to a specific Twilio phone number, it is only used for calls and messages associated with that particular phone number rather than the entire Twilio account.

Add-on Listings enabled for Recordings and TaskRouter do not support phone number assignments.

(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.


AssignedAddOn Properties

assignedaddon-properties page anchor
Property nameTypeRequiredDescriptionChild properties
sidSID<XE>Optional
Not PII

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

Pattern: ^XE[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

friendly_namestringOptional
PII MTL: 30 days

The string that you assigned to describe the resource.


descriptionstringOptional

A short description of the functionality that the Add-on provides.


configurationobjectOptional

A JSON string that represents the current configuration of this Add-on installation.


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.


date_updatedstring<date-time-rfc-2822>Optional

The date and time in GMT that the resource was last updated specified in RFC 2822(link takes you to an external page) format.


uristringOptional

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


subresource_urisobject<uri-map>Optional

A list of related resources identified by their relative URIs.


Assign an Add-on installation to the Number specified.

assign-an-add-on-installation-to-the-number-specified page anchor
POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.json

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
AccountSidSID<AC>required

The SID of the Account that will create the resource.

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

ResourceSidSID<PN>required

The SID of the Phone Number to assign the Add-on.

Pattern: ^PN[0-9a-fA-F]{32}$Min length: 34Max length: 34
Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
InstalledAddOnSidSID<XE>required

The SID that identifies the Add-on installation.

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

Create an AssignedAddOn

create-an-assignedaddon 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 createIncomingPhoneNumberAssignedAddOn() {
_20
const assignedAddOn = await client
_20
.incomingPhoneNumbers("PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_20
.assignedAddOns.create({
_20
installedAddOnSid: "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_20
});
_20
_20
console.log(assignedAddOn.sid);
_20
}
_20
_20
createIncomingPhoneNumberAssignedAddOn();

Output

_17
{
_17
"sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"resource_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"friendly_name": "VoiceBase High Accuracy Transcription",
_17
"description": "Automatic Transcription and Keyword Extract...",
_17
"configuration": {
_17
"bad_words": true
_17
},
_17
"unique_name": "voicebase_high_accuracy_transcription",
_17
"date_created": "Thu, 07 Apr 2016 23:52:28 +0000",
_17
"date_updated": "Thu, 07 Apr 2016 23:52:28 +0000",
_17
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
_17
"subresource_uris": {
_17
"extensions": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions.json"
_17
}
_17
}


Fetch an instance of an Add-on installation currently assigned to this Number.

fetch-an-instance-of-an-add-on-installation-currently-assigned-to-this-number page anchor
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{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: 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

SidSID<XE>required

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

Pattern: ^XE[0-9a-fA-F]{32}$Min length: 34Max length: 34
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 fetchIncomingPhoneNumberAssignedAddOn() {
_19
const assignedAddOn = await client
_19
.incomingPhoneNumbers("PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_19
.assignedAddOns("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_19
.fetch();
_19
_19
console.log(assignedAddOn.sid);
_19
}
_19
_19
fetchIncomingPhoneNumberAssignedAddOn();

Output

_17
{
_17
"sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"resource_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"friendly_name": "VoiceBase High Accuracy Transcription",
_17
"description": "Automatic Transcription and Keyword Extract...",
_17
"configuration": {
_17
"bad_words": true
_17
},
_17
"unique_name": "voicebase_high_accuracy_transcription",
_17
"date_created": "Thu, 07 Apr 2016 23:52:28 +0000",
_17
"date_updated": "Thu, 07 Apr 2016 23:52:28 +0000",
_17
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
_17
"subresource_uris": {
_17
"extensions": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions.json"
_17
}
_17
}


Retrieve a list of Add-on installations currently assigned to this Number.

retrieve-a-list-of-add-on-installations-currently-assigned-to-this-number page anchor
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.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
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 AssignedAddOns

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

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

Output

_29
{
_29
"end": 0,
_29
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns.json?PageSize=50&Page=0",
_29
"next_page_uri": null,
_29
"page": 0,
_29
"page_size": 50,
_29
"previous_page_uri": null,
_29
"assigned_add_ons": [
_29
{
_29
"sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_29
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_29
"resource_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_29
"friendly_name": "VoiceBase High Accuracy Transcription",
_29
"description": "Automatic Transcription and Keyword Extract...",
_29
"configuration": {
_29
"bad_words": true
_29
},
_29
"unique_name": "voicebase_high_accuracy_transcription",
_29
"date_created": "Thu, 07 Apr 2016 23:52:28 +0000",
_29
"date_updated": "Thu, 07 Apr 2016 23:52:28 +0000",
_29
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
_29
"subresource_uris": {
_29
"extensions": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions.json"
_29
}
_29
}
_29
],
_29
"start": 0,
_29
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns.json?PageSize=50&Page=0"
_29
}


Remove the assignment of an Add-on installation from the Number specified.

remove-the-assignment-of-an-add-on-installation-from-the-number-specified page anchor
DELETE https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json

Property nameTypeRequiredPIIDescription
AccountSidSID<AC>required

The SID of the Account that created the resources to delete.

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

SidSID<XE>required

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

Pattern: ^XE[0-9a-fA-F]{32}$Min length: 34Max length: 34
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

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


Rate this page: