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.
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.
The unique string that that we created to identify the resource.
^XE[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Account that created the resource.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Phone Number to which the Add-on is assigned.
^PN[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
A JSON string that represents the current configuration of this Add-on installation.
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 date and time in GMT that the resource was created specified in RFC 2822 format.
The date and time in GMT that the resource was last updated specified in RFC 2822 format.
A list of related resources identified by their relative URIs.
POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.json
The SID of the Account that will create the resource.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Phone Number to assign the Add-on.
^PN[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
application/x-www-form-urlencoded
The SID that identifies the Add-on installation.
^XE[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
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 createIncomingPhoneNumberAssignedAddOn() {11const assignedAddOn = await client12.incomingPhoneNumbers("PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.assignedAddOns.create({14installedAddOnSid: "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",15});1617console.log(assignedAddOn.sid);18}1920createIncomingPhoneNumberAssignedAddOn();
1{2"sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"resource_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"friendly_name": "VoiceBase High Accuracy Transcription",6"description": "Automatic Transcription and Keyword Extract...",7"configuration": {8"bad_words": true9},10"unique_name": "voicebase_high_accuracy_transcription",11"date_created": "Thu, 07 Apr 2016 23:52:28 +0000",12"date_updated": "Thu, 07 Apr 2016 23:52:28 +0000",13"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",14"subresource_uris": {15"extensions": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions.json"16}17}
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json
The SID of the Account that created the resource to fetch.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Phone Number to which the Add-on is assigned.
^PN[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The Twilio-provided string that uniquely identifies the resource to fetch.
^XE[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
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 fetchIncomingPhoneNumberAssignedAddOn() {11const assignedAddOn = await client12.incomingPhoneNumbers("PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.assignedAddOns("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")14.fetch();1516console.log(assignedAddOn.sid);17}1819fetchIncomingPhoneNumberAssignedAddOn();
1{2"sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"resource_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"friendly_name": "VoiceBase High Accuracy Transcription",6"description": "Automatic Transcription and Keyword Extract...",7"configuration": {8"bad_words": true9},10"unique_name": "voicebase_high_accuracy_transcription",11"date_created": "Thu, 07 Apr 2016 23:52:28 +0000",12"date_updated": "Thu, 07 Apr 2016 23:52:28 +0000",13"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",14"subresource_uris": {15"extensions": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions.json"16}17}
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.json
The SID of the Account that created the resources to read.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Phone Number to which the Add-on is assigned.
^PN[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Maximum: 1000
The page token. This is provided by the API.
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 listIncomingPhoneNumberAssignedAddOn() {11const assignedAddOns = await client12.incomingPhoneNumbers("PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.assignedAddOns.list({ limit: 20 });1415assignedAddOns.forEach((a) => console.log(a.sid));16}1718listIncomingPhoneNumberAssignedAddOn();
1{2"end": 0,3"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns.json?PageSize=50&Page=0",4"next_page_uri": null,5"page": 0,6"page_size": 50,7"previous_page_uri": null,8"assigned_add_ons": [9{10"sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",11"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",12"resource_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",13"friendly_name": "VoiceBase High Accuracy Transcription",14"description": "Automatic Transcription and Keyword Extract...",15"configuration": {16"bad_words": true17},18"unique_name": "voicebase_high_accuracy_transcription",19"date_created": "Thu, 07 Apr 2016 23:52:28 +0000",20"date_updated": "Thu, 07 Apr 2016 23:52:28 +0000",21"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",22"subresource_uris": {23"extensions": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions.json"24}25}26],27"start": 0,28"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns.json?PageSize=50&Page=0"29}
DELETE https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json
The SID of the Account that created the resources to delete.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Phone Number to which the Add-on is assigned.
^PN[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The Twilio-provided string that uniquely identifies the resource to delete.
^XE[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
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 deleteIncomingPhoneNumberAssignedAddOn() {11await client12.incomingPhoneNumbers("PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.assignedAddOns("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")14.remove();15}1617deleteIncomingPhoneNumberAssignedAddOn();