Add-on Management API - Twilio
Register for SIGNAL by 8/31 for $250 off. Register now.

Add-on Management API

This guide describes the APIs to retrieve available and installed Add-ons, as well as install specific Add-ons and manage their extension(s). This API complements the Add-on capabilities exposed via the Console to provide programmatic access.

Note: The Add-on Management API only supports Add-ons that are in GA or Beta state. Add-ons that are labeled as Coming Soon or Developer Preview are not accessible via the API and must be managed via the Console.

Note: This API is currently in Developer Preview.

While this API is in Developer Preview, it should be accessed via the following base domain:

https://preview.twilio.com

The API may also be accessed via Next-gen helper libraries.


Available Add-ons API

The Available Add-ons API provides detailed descriptions of the Add-ons currently available to be installed by an Account. This API does not allow you to mutate any of the records.

URIs

/marketplace/AvailableAddOns
/marketplace/AvailableAddOns/{AddOnSid} 

Properties

Name Description
configuration_schema

The JSON Schema describing configuration that must be provided when installing a given Add-on. (not PII)

description

A short description of the functionality provided by the Add-on. (not PII)

friendly_name

A human-readable description of this Add-on. (not PII)

pricing_type

The mechanism by which customers are charged for using this Add-on. (not PII)

sid

A 34 character string that uniquely identifies this Add-on. (not PII)

Available Add-ons List Resource

HTTP GET

Returns a list of Available Add-on resources.

Loading Code Samples...
Language
SDK Version:
  • 6.x
Format:
  • py
  • JSON
# Download the Python helper library from twilio.com/docs/python/install
# NOTE : This API requires the Next-gen (v6.x) helper library. 

from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

available_add_ons = client.preview.available_add_ons.list()
for add_on in available_add_ons:
    print add_on.friendly_name, " ", add_on.sid
curl https://preview.twilio.com/marketplace/AvailableAddOns -u "{TwilioAccountSid}:{TwilioAuthToken}"
IBM Watson Message Insights   XB2701032f66435fabccfc06e78bef8c88
IBM Watson Message Sentiment   XB28c1cef739ee28431d743fa2794132d4
Mobile Commons Optout Classifier   XB08becea6c9dca8f09e827ffac29049c0
Whitepages Pro Caller Identification   XB65bee4ad5be08e28368def1be1a3efee
Whitepages Pro Phone Intelligence   XB8f0b802b9fbddb541161678e24ea2306
Whitepages Pro Phone Reputation   XB56520d8bffd66533ca92b398596b8438
Advanced Caller ID by Next Caller   XB73cdb5ac3395a439800f298fa8a43f02
Twilio Carrier Information   XBc42aaa410c578e05e64be541778797e3
Twilio Caller Name   XB425fefe9344ee54c704cb03685e24941
Payfone TCPA Compliance   XB1bdc05aa1e32754917740eca84f73612
Marchex Clean Call   XBac2c99d9c684a765ced0b18cf0e5e1c7
Marchex Sentiment Analysis for SMS   XBb2bb92f12d466867ae1eba7cb0f2a5eb
Nomorobo Spam Score   XB06d5274893cc9af4198667d2f7d74d09
IceHook Systems Scout    XBb19c69a5ab6b8f4c89a56a9ffa8faf6e
IBM Watson Speech to Text   XB85b56ed9ce713e0ac62342b901233193
VoiceBase High Accuracy Transcription   XB7afe11af3e292cadb03248e0066b8c1e
TrueSpam by TrueCNAM   XB43a9a71dcdeb33209d78450803926dd2
{
  "available_add_ons": [
    {
      "description": "Use IBM Watson to surface actionable insights from the content of messages",
      "url": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88",
      "friendly_name": "IBM Watson Message Insights",
      "configuration_schema": {
      },
      "pricing_type": "per request",
      "sid": "XB2701032f66435fabccfc06e78bef8c88",
      "links": {
        "extensions": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88/Extensions"
      }
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://preview.twilio.com/marketplace/AvailableAddOns?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://preview.twilio.com/marketplace/AvailableAddOns?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "available_add_ons"
  }
}
Get list of Available Add-on resources

Available Add-on Instance Resource

HTTP GET

Returns a single instance of an Available Add-on resource.

Loading Code Samples...
Language
Format:
  • JSON
curl https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88 -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "description": "Use IBM Watson to surface actionable insights from the content of messages",
  "url": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88",
  "friendly_name": "IBM Watson Message Insights",
  "configuration_schema": {
  },
  "pricing_type": "per request",
  "sid": "XB2701032f66435fabccfc06e78bef8c88",
  "links": {
    "extensions": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88/Extensions"
  }
}
Get a single instance of an Available Add-on resource


Available Add-on Extensions API

The Available Add-on Extension subresource details where a given Available Add-on can be invoked.

URIs

/marketplace/AvailableAddOns/{AddOnSid}/Extensions

Properties

Name Description
friendly_name

A human-readable description of this Extension. (not PII)

product_name

A human-readable description of the Product this Extension is used within. (not PII)

sid

A 34 character string that uniquely identifies this Extension. (not PII)

unique_name

The human-readable string that uniquely identifies this Extension. (not PII)

Available Add-on Extensions List Resource

HTTP GET

Returns a list of Extension resources that detail the invocation points for the Available Add-on.

Loading Code Samples...
Language
Format:
  • JSON
curl https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88/Extensions -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88/Extensions?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88/Extensions?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "extensions"
  },
  "extensions": [
    {
      "unique_name": "sms-incoming",
      "url": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88/Extensions/XF6e0226602b41b7fee7b01f8ece583dd9",
      "friendly_name": "Incoming SMS Message",
      "available_add_on_sid": "XB2701032f66435fabccfc06e78bef8c88",
      "sid": "XF6e0226602b41b7fee7b01f8ece583dd9",
      "product_name": "Programmable SMS"
    }
  ]
}
Get a list of Extension resources for an Available Add-on


Installed Add-ons API

The Installed Add-ons API allows you to install, configure and manage Add-ons for an Account. An Add-on may be installed multiple times on a given account, with different Add-on Configurations. Upon installation, the Add-on is identified by an AddOnConfigurationSid.

URIs

/marketplace/InstalledAddOns
/marketplace/InstalledAddOns/{AddOnConfigurationSid}

Properties

Name Description
account_sid

The unique id of the Account that has installed this Add-on. (not PII)

configuration

The JSON object representing the current configuration of this Add-on installation. (not PII)

date_created

The date that this Add-on installation was created, given in ISO 8601 format. (not PII)

date_updated

The date that this Add-on installation was last updated, given in ISO 8601 format. (not PII)

description

A short description of the functionality provided by the Add-on. (not PII)

friendly_name

A human-readable description of this Add-on installation. (not PII)

links

A dictionary of URLs for related resource. (not PII)

sid

34 character string that uniquely identifies the Add-on. This Sid can also be found in the Console on that specific Add-ons page as the 'Available Add-on Sid'. (not PII)

unique_name

The human-readable string that uniquely identifies an Add-on installation for an Account. (not PII)

Installed Add-ons List Resource

HTTP GET

Returns a list of Installed Add-ons associated with the given Account.

Loading Code Samples...
Language
SDK Version:
  • 6.x
Format:
  • py
  • JSON
# Download the Python helper library from twilio.com/docs/python/install
# NOTE : This API requires the Next-gen (v6.x) helper library. 
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

installed_add_ons = client.preview.installed_add_ons.list()
for add_on in installed_add_ons:
    print add_on.friendly_name, " ", add_on.sid
curl https://preview.twilio.com/marketplace/InstalledAddOns -u "{TwilioAccountSid}:{TwilioAuthToken}"
IBM Watson Message Insights   XEfd99d9cfcbff92ed96a33970fadb0cb4
{
  "installed_add_ons": [
    {
      "unique_name": "ibm_watson_insights",
      "description": "Use IBM Watson to surface actionable insights from the content of messages",
      "date_updated": "2017-02-14T06:41:13Z",
      "friendly_name": "IBM Watson Message Insights",
      "url": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6",
      "sid": "XE6aa09d8b036d2acf9c6d50a627f3c4d6",
      "date_created": "2016-10-18T21:26:04Z",
      "configuration": "{}",
      "links": {
        "extensions": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions",
        "available_add_on": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88"
      }
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://preview.twilio.com/marketplace/InstalledAddOns?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://preview.twilio.com/marketplace/InstalledAddOns?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "installed_add_ons"
  }
}
Get a list of Installed Add-ons associated with the given Account.

Installed Add-on Instance Resource

HTTP GET

Returns a single instance of an Installed Add-on associated with the given Account.

Loading Code Samples...
Language
SDK Version:
  • 6.x
Format:
  • py
  • JSON
# Download the Python helper library from twilio.com/docs/python/install
# NOTE : This API requires the Next-gen (v6.x) helper library. 
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

add_on = client.preview.installed_add_ons.get(sid="XE6aa09d8b036d2acf9c6d50a627f3c4d6").fetch()
print add_on.friendly_name
curl https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6 -u "{TwilioAccountSid}:{TwilioAuthToken}"
IBM Watson Message Insights
{
  "unique_name": "ibm_watson_insights",
  "description": "Use IBM Watson to surface actionable insights from the content of messages",
  "date_updated": "2017-02-11T05:06:00Z",
  "friendly_name": "IBM Watson Message Insights",
  "url": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6",
  "sid": "XE6aa09d8b036d2acf9c6d50a627f3c4d6",
  "date_created": "2016-10-18T21:26:04Z",
  "configuration": "{}",
  "links": {
    "extensions": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions",
    "available_add_on": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88"
  }
}
Get a single instance of an Installed Add-on for an Account

HTTP POST

Allows you to install an Available Add-on to their Account.

Parameters
Name Description
AcceptTermsOfService

Required. A boolean that reflects your decision whether to accept the Terms of Service (not PII)

AvailableAddOnSid

Required. A 34 character string that uniquely identifies the Add-on to be installed. (not PII)

Configuration

Optional. The JSON object representing the configuration of the new Add-on installation. (not PII)

UniqueName

Optional. The human-readable string that uniquely identifies this Add-on installation for an Account. (not PII)

Loading Code Samples...
Language
SDK Version:
  • 6.x
Format:
  • py
  • JSON
# Download the Python helper library from twilio.com/docs/python/install
# NOTE : This API requires the Next-gen (v6.x) helper library. 
from twilio.rest import Client
import json

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

#Note that installing an Add-on does not automatically enable it. You will need to enable it for specific "extensions" after installation.

# Install the Twilio Caller Name Add-on on this account. 
installed_add_on = client.preview.installed_add_ons.create(available_add_on_sid="XB425fefe9344ee54c704cb03685e24941", 
                                                             accept_terms_of_service=True)
print installed_add_on.friendly_name, installed_add_on.unique_name, installed_add_on.sid

# Install the IBM Watson Speech to Text Add-on (with Configuration data) on this account.
ibm_watson_stt_configuration = { 
    'callback_method': 'POST',
    'callback_url': 'https://change.this.to.your.callback.url',
    'include-keywords': True,
    'include-topics': True
    }
installed_add_on = client.preview.installed_add_ons.create(available_add_on_sid="XB85b56ed9ce713e0ac62342b901233193", 
                                                            configuration = json.dumps(ibm_watson_stt_configuration), 
                                                            accept_terms_of_service=True)
print installed_add_on.friendly_name, installed_add_on.unique_name, installed_add_on.sid
curl -X POST https://preview.twilio.com/marketplace/InstalledAddOns --data "AvailableAddOnSid=XBac2c99d9c684a765ced0b18cf0e5e1c7&AcceptTermsOfService=true" -u "{TwilioAccountSid}:{TwilioAuthToken}"
Twilio Caller Name  twilio_caller_name  XEcd122a2e96cb55b1c29e47066c70d05b

IBM Watson Speech to Text  ibm_watson_speechtotext   XEfd4db18385a5143b3b8fd240ad40ddb7
{
  "unique_name": "Robocall_and_Spam_Blocking_Solution",
  "description": "#1 Robocall and Spam Blocking Solution",
  "date_updated": "2017-02-14T06:56:39Z",
  "friendly_name": "Marchex Clean Call",
  "url": "https://preview.twilio.com/marketplace/InstalledAddOns/XEd5be652411e9c93b8377c528296be5df",
  "sid": "XEd5be652411e9c93b8377c528296be5df",
  "date_created": "2017-02-14T06:56:39Z",
  "configuration": "{}",
  "links": {
    "extensions": "https://preview.twilio.com/marketplace/InstalledAddOns/XEd5be652411e9c93b8377c528296be5df/Extensions",
    "available_add_on": "https://preview.twilio.com/marketplace/AvailableAddOns/XBac2c99d9c684a765ced0b18cf0e5e1c7"
  }
}
Install an Available Add-on to an account

HTTP POST

Allows you to update the configuration for an Installed Add-on by POSTing a JSON object that validates against the schema exposed by the Available Add-on.

Name Description
Configuration

Optional. Valid JSON object that conform to the configuration schema exposed by the associated Available Add-on resource. This is only required by Add-ons that need to be configured (not PII)

UniqueName

Optional. The human-readable string that uniquely identifies this Add-on installation for an Account. (not PII)

Loading Code Samples...
Language
Format:
  • JSON
curl -X POST https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6 --data "Configuration={}&UniqueName=ibm_watson_insights_new" -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "unique_name": "ibm_watson_insights_new",
  "description": "Use IBM Watson to surface actionable insights from the content of messages",
  "date_updated": "2017-02-14T06:41:13Z",
  "friendly_name": "IBM Watson Message Insights",
  "url": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6",
  "sid": "XE6aa09d8b036d2acf9c6d50a627f3c4d6",
  "date_created": "2016-10-18T21:26:04Z",
  "configuration": "{}",
  "links": {
    "extensions": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions",
    "available_add_on": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88"
  }
}
Update the configuration for an Installed Add-on


HTTP DELETE

Uninstalls the Add-on from the Account. If the Add-on is currently assigned to an Incoming Phone Number the API will return a 400 informing the user to remove the assignments. Successful responses will return no content.


Installed Add-on Extensions API

An Extension identifies a Twilio product or an integration point in a Twilio product where the Add-on gets invoked. Examples of Extensions include : Record Verb, Dial Verb, Lookup API, Incoming Voice Call, Incoming SMS, etc.

The Installed Add-on Extensions API provides you with the ability to view and configure when an Installed Add-on is invoked.

To allow you to control the roll out of Add-ons by default all Extensions will be disabled. This means you will need to make additional API requests to enable Extensions before they can use the installed Add-on. This will give you the opportunity to first associate an Installed Add-on with an Incoming Phone Number before enabling any Extensions.

The following table lists the currently supported Extensions. Each Add-on typically supports a subset of these Extensions.

Product Name Friendly Name Unique Name
Lookup Lookups lookup-api
Programmable SMS Incoming SMS Message sms-incoming
TaskRouter Create TaskRouter Tasks taskrouter-create-task
Programmable Voice Incoming Voice Call voice-incoming
Programmable Voice Record Verb Recordings recording-verb
Programmable Voice Outgoing Call (API) Recordings recording-api
Programmable Voice Conference Recordings recording-conference
Programmable Voice Dial Verb Recordings recording-dial

URIs

/marketplace/InstalledAddOns/{AddOnConfigurationSid}/Extensions
/marketplace/InstalledAddOns/{AddOnConfigurationSid}/Extensions/{AddOnExtensionSid}

Properties

Name Description
enabled

A Boolean indicating if the Extension will be invoked. (not PII)

friendly_name

A human-readable description of this Extension. (not PII)

product_name

A human-readable description of the Product this Extension is used within. (not PII)

sid

A 34 character string that uniquely identifies this Extension. (not PII)

unique_name

The human-readable string that uniquely identifies this Extension. (not PII)

Installed Add-on Extensions List Resource

HTTP GET

Returns a list of Extensions where the Add-on can be invoked.

Loading Code Samples...
Language
SDK Version:
  • 6.x
Format:
  • py
  • JSON
# Download the Python helper library from twilio.com/docs/python/install
# NOTE : This API requires the Next-gen (v6.x) helper library. 
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

add_on = client.preview.installed_add_ons.get(sid="XE0000000000000000000000000").fetch()
for e in add_on.extensions.list():
    print e.unique_name, e.enabled
curl https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions -u "{TwilioAccountSid}:{TwilioAuthToken}"
voice-incoming False
lookup-api False
taskrouter-create-task False
{
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "extensions"
  },
  "extensions": [
    {
      "unique_name": "sms-incoming",
      "url": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions/XF6e0226602b41b7fee7b01f8ece583dd9",
      "friendly_name": "Incoming SMS Message",
      "enabled": true,
      "sid": "XF6e0226602b41b7fee7b01f8ece583dd9",
      "product_name": "Programmable SMS",
      "installed_add_on_sid": "XE6aa09d8b036d2acf9c6d50a627f3c4d6"
    }
  ]
}
Get a list of Extensions where the Add-on can be invoked

Installed Add-on Extension Instance Resource

HTTP GET

Returns a single instance of an Add-on Extension resource.

Loading Code Samples...
Language
Format:
  • JSON
curl https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions/XF6e0226602b41b7fee7b01f8ece583dd9 -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "unique_name": "sms-incoming",
  "url": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions/XF6e0226602b41b7fee7b01f8ece583dd9",
  "friendly_name": "Incoming SMS Message",
  "enabled": true,
  "sid": "XF6e0226602b41b7fee7b01f8ece583dd9",
  "product_name": "Programmable SMS",
  "installed_add_on_sid": "XE6aa09d8b036d2acf9c6d50a627f3c4d6"
}
Get a single instance of an Add-on Extension resource


HTTP POST

Allows you to activate or deactivate an Extension point associated with the Installed Add-on.

Required Parameters
Name Description
Enabled

Required. A Boolean indicating if the Extension will be invoked. (not PII)

Loading Code Samples...
Language
SDK Version:
  • 6.x
Format:
  • JSON
# Download the Python helper library from twilio.com/docs/python/install
# NOTE : This API requires the Next-gen (v6.x) helper library. 
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# Fetch the installed Add-on using it's installed add-on sid
installed_add_on = client.preview.installed_add_ons.get(sid="XE0000000000000000000000000").fetch()

# Enable this add-on for Lookup API
[e.update(enabled=True) for e in installed_add_on.extensions.list() if e.unique_name == u'lookup-api']

# Enable this add-on for Incoming Voice call
[e.update(enabled=True) for e in installed_add_on.extensions.list() if e.unique_name == u'incoming-voice']
curl -X POST https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions/XF6e0226602b41b7fee7b01f8ece583dd9 --data "Enabled=true" -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "unique_name": "sms-incoming",
  "url": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions/XF6e0226602b41b7fee7b01f8ece583dd9",
  "friendly_name": "Incoming SMS Message",
  "enabled": true,
  "sid": "XF6e0226602b41b7fee7b01f8ece583dd9",
  "product_name": "Programmable SMS",
  "installed_add_on_sid": "XE6aa09d8b036d2acf9c6d50a627f3c4d6"
}
Activate or deactivate an Extension point associated for an Installed Add-on


Incoming Phone Number Assigned Add-ons API

The Incoming Phone Number Assigned Add-ons Subresource details which Add-ons have been assigned for a given Twilio phone number. Assigning an Add-on to a specific Twilio phone number limits the invocation of that Add-on only for Calls or Messages on that particular Phone number.

Note that Add-ons enabled for Recordings and TaskRouter do not support phone number assignments.

URIs

/2010-04-01/IncomingPhoneNumbers/{PhoneNumberSid}/AssignedAddOns
/2010-04-01/IncomingPhoneNumbers/{PhoneNumberSid}/AssignedAddOns/{AddOnConfigurationSid}
/2010-04-01/IncomingPhoneNumbers/{PhoneNumberSid}/AssignedAddOns/{AddOnConfigurationSid}/Extensions

Assigned Add-on Properties

As a subresource this API will expose the same properties in the Installed Add Ons API.

Phone Number Assigned Add-on List Resource

HTTP GET

Returns of a list of the Installed Add-ons assigned to the given Incoming Phone Number.

Loading Code Samples...
Language
Format:
  • JSON
curl https://api.twilio.com/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns.json -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "first_page_uri": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns.json?PageSize=50&Page=0",
  "end": 1,
  "previous_page_uri": null,
  "uri": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns.json?PageSize=50&Page=0",
  "page_size": 50,
  "assigned_add_ons": [
    {
      "unique_name": "marchex_cleancall",
      "description": "#1 Robocall and Spam Blocking Solution",
      "date_updated": "Mon, 09 Jan 2017 18:37:18 +0000",
      "friendly_name": "Marchex Clean Call",
      "uri": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1.json",
      "account_sid": "ACfc7e27959afd07eadf83835b2dd23124e",
      "sid": "XE04586879da5bbe574f946ad41126b6c1",
      "date_created": "Mon, 09 Jan 2017 18:37:18 +0000",
      "configuration": {
        
      }
  ],
  "start": 0,
  "next_page_uri": null,
  "page": 0
}
Get a list of the Installed Add-ons assigned to the given Incoming Phone Number

Phone Number Assigned Add-on Instance Resource

HTTP GET

Returns a single instance of an Installed Add-on assigned to the given Incoming Phone Number.

Loading Code Samples...
Language
Format:
  • JSON
curl https://api.twilio.com/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1.json -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "unique_name": "marchex_cleancall",
  "description": "#1 Robocall and Spam Blocking Solution",
  "date_updated": "Mon, 09 Jan 2017 18:37:18 +0000",
  "friendly_name": "Marchex Clean Call",
  "uri": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1.json",
  "account_sid": "ACfc7e27959afd07eadf83835b2dd23124e",
  "sid": "XE04586879da5bbe574f946ad41126b6c1",
  "date_created": "Mon, 09 Jan 2017 18:37:18 +0000",
  "configuration": {
    
  },
  "resource_sid": "PNed5f7b8de9cd35581e8d6839e591aa23",
  "subresource_uris": {
    "extensions": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1/Extensions.json"
  }
}
Get a single instance of an Installed Add-on assigned to the given Incoming Phone Number

HTTP POST

Allows you to assign an Installed Add-on with an Incoming Phone Number. This will limit the Add-on to only be invoked for associated Incoming Phone Number.

Required Parameters
Name Description
InstalledAddOnSid

Required. A 34 character string that uniquely identifies the Add-on installation. (not PII)

Loading Code Samples...
Language
SDK Version:
  • 6.x
Format:
  • JSON
# Download the Python helper library from twilio.com/docs/python/install
# NOTE : This API requires the Next-gen (v6.x) helper library. 
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)


# Install the Twilio Caller Name Add-on on this account. 
#Note that installing an Add-on does not automatically enable it. You will need to enable it for specific "extensions" after installation.
installed_add_on = client.preview.installed_add_ons.create(available_add_on_sid="XB425fefe9344ee54c704cb03685e24941", 
                                                           accept_terms_of_service=True)


# Or Fetch an already installed Add-on using it's installed add-on sid
installed_add_on = client.preview.installed_add_ons.get(sid="XE0000000000000000000000000").fetch()


# Associate this Add-on only for a specific phone number.
incoming_number = client.account.incoming_phone_numbers.get(sid="PNxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
incoming_number.assigned_add_ons.create(installed_add_on_sid="XE0000000000000000000000000")

# At this point, enabling this Add-on will enable it for specific phone number only.
[e.update(enabled=True) for e in installed_add_on.extensions.list() if e.unique_name == u'incoming-voice']
curl -X POST https://api.twilio.com/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns.json --data "InstalledAddOnSid=XE77f2de43838a5a4a4ba8fcd80205dfcb" -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "unique_name": "ibm_watson_sentiment",
  "description": "Use IBM Watson to identify positive/negative sentiment from messages",
  "date_updated": "Mon, 09 Jan 2017 18:30:52 +0000",
  "friendly_name": "IBM Watson Message Sentiment",
  "uri": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE77f2de43838a5a4a4ba8fcd80205dfcb.json",
  "account_sid": "ACfc7e27959afd07eadf83835b2dd23124e",
  "sid": "XE77f2de43838a5a4a4ba8fcd80205dfcb",
  "date_created": "Mon, 09 Jan 2017 18:30:52 +0000",
  "configuration": {    
  },
  "resource_sid": "PNed5f7b8de9cd35581e8d6839e591aa23",
  "subresource_uris": {
    "extensions": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE77f2de43838a5a4a4ba8fcd80205dfcb/Extensions.json"
  }
}
Assign an Installed Add-on with an Incoming Phone Number

HTTP DELETE

Deleting at the Assigned Add-on instance resource will remove the assignment between the Add-on and the Incoming Phone Number. Successful responses will return no content.


Phone Number Assigned Add-on Extensions

Properties

As a subresource this API will expose the same properties in the installed Add-ons Extension API.

Assigned Add-on Extension List Resource

HTTP GET

Returns a list of the Extensions for the Installed Add-on assigned to the given Incoming Phone Number.

Loading Code Samples...
Language
Format:
  • JSON
curl https://api.twilio.com/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1/Extensions.json -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "first_page_uri": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1/Extensions.json?PageSize=50&Page=0",
  "end": 2,
  "previous_page_uri": null,
  "uri": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1/Extensions.json?PageSize=50&Page=0",
  "page_size": 50,
  "start": 0,
  "extensions": [
    {
      "unique_name": "voice-incoming",
      "resource_sid": "PNed5f7b8de9cd35581e8d6839e591aa23",
      "enabled": true,
      "friendly_name": "Incoming Voice Call",
      "uri": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1/Extensions/XF025b77384a62367bd120b7ce60250d7b.json",
      "account_sid": "ACfc7e27959afd07eadf83835b2dd23124e",
      "assigned_add_on_sid": "XE04586879da5bbe574f946ad41126b6c1",
      "sid": "XF025b77384a62367bd120b7ce60250d7b",
      "product_name": "Programmable Voice"
    }
  ],
  "next_page_uri": null,
  "page": 0
}
Get a list of the Extensions for the Installed Add-on assigned to the given Incoming Phone Number

Assigned Add-on Extension Instance Resource

HTTP GET

Returns a single Extension for the Installed Add-on assigned to the given Incoming Phone Number.

Loading Code Samples...
Language
Format:
  • JSON
curl https://api.twilio.com/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1/Extensions/XF025b77384a62367bd120b7ce60250d7b.json -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "unique_name": "voice-incoming",
  "resource_sid": "PNed5f7b8de9cd35581e8d6839e591aa23",
  "enabled": true,
  "friendly_name": "Incoming Voice Call",
  "uri": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1/Extensions/XF025b77384a62367bd120b7ce60250d7b.json",
  "account_sid": "ACfc7e27959afd07eadf83835b2dd23124e",
  "assigned_add_on_sid": "XE04586879da5bbe574f946ad41126b6c1",
  "sid": "XF025b77384a62367bd120b7ce60250d7b",
  "product_name": "Programmable Voice"
}
Get a single Extension for the Installed Add-on assigned to the given Incoming Phone Number

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.

Loading Code Samples...
SDK Version:
  • 6.x
Format:
  • py
  • JSON
# Download the Python helper library from twilio.com/docs/python/install
# NOTE : This API requires the Next-gen (v6.x) helper library. 

from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

available_add_ons = client.preview.available_add_ons.list()
for add_on in available_add_ons:
    print add_on.friendly_name, " ", add_on.sid
curl https://preview.twilio.com/marketplace/AvailableAddOns -u "{TwilioAccountSid}:{TwilioAuthToken}"
IBM Watson Message Insights   XB2701032f66435fabccfc06e78bef8c88
IBM Watson Message Sentiment   XB28c1cef739ee28431d743fa2794132d4
Mobile Commons Optout Classifier   XB08becea6c9dca8f09e827ffac29049c0
Whitepages Pro Caller Identification   XB65bee4ad5be08e28368def1be1a3efee
Whitepages Pro Phone Intelligence   XB8f0b802b9fbddb541161678e24ea2306
Whitepages Pro Phone Reputation   XB56520d8bffd66533ca92b398596b8438
Advanced Caller ID by Next Caller   XB73cdb5ac3395a439800f298fa8a43f02
Twilio Carrier Information   XBc42aaa410c578e05e64be541778797e3
Twilio Caller Name   XB425fefe9344ee54c704cb03685e24941
Payfone TCPA Compliance   XB1bdc05aa1e32754917740eca84f73612
Marchex Clean Call   XBac2c99d9c684a765ced0b18cf0e5e1c7
Marchex Sentiment Analysis for SMS   XBb2bb92f12d466867ae1eba7cb0f2a5eb
Nomorobo Spam Score   XB06d5274893cc9af4198667d2f7d74d09
IceHook Systems Scout    XBb19c69a5ab6b8f4c89a56a9ffa8faf6e
IBM Watson Speech to Text   XB85b56ed9ce713e0ac62342b901233193
VoiceBase High Accuracy Transcription   XB7afe11af3e292cadb03248e0066b8c1e
TrueSpam by TrueCNAM   XB43a9a71dcdeb33209d78450803926dd2
{
  "available_add_ons": [
    {
      "description": "Use IBM Watson to surface actionable insights from the content of messages",
      "url": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88",
      "friendly_name": "IBM Watson Message Insights",
      "configuration_schema": {
      },
      "pricing_type": "per request",
      "sid": "XB2701032f66435fabccfc06e78bef8c88",
      "links": {
        "extensions": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88/Extensions"
      }
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://preview.twilio.com/marketplace/AvailableAddOns?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://preview.twilio.com/marketplace/AvailableAddOns?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "available_add_ons"
  }
}
Format:
  • JSON
curl https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88 -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "description": "Use IBM Watson to surface actionable insights from the content of messages",
  "url": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88",
  "friendly_name": "IBM Watson Message Insights",
  "configuration_schema": {
  },
  "pricing_type": "per request",
  "sid": "XB2701032f66435fabccfc06e78bef8c88",
  "links": {
    "extensions": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88/Extensions"
  }
}
Format:
  • JSON
curl https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88/Extensions -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88/Extensions?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88/Extensions?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "extensions"
  },
  "extensions": [
    {
      "unique_name": "sms-incoming",
      "url": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88/Extensions/XF6e0226602b41b7fee7b01f8ece583dd9",
      "friendly_name": "Incoming SMS Message",
      "available_add_on_sid": "XB2701032f66435fabccfc06e78bef8c88",
      "sid": "XF6e0226602b41b7fee7b01f8ece583dd9",
      "product_name": "Programmable SMS"
    }
  ]
}
SDK Version:
  • 6.x
Format:
  • py
  • JSON
# Download the Python helper library from twilio.com/docs/python/install
# NOTE : This API requires the Next-gen (v6.x) helper library. 
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

installed_add_ons = client.preview.installed_add_ons.list()
for add_on in installed_add_ons:
    print add_on.friendly_name, " ", add_on.sid
curl https://preview.twilio.com/marketplace/InstalledAddOns -u "{TwilioAccountSid}:{TwilioAuthToken}"
IBM Watson Message Insights   XEfd99d9cfcbff92ed96a33970fadb0cb4
{
  "installed_add_ons": [
    {
      "unique_name": "ibm_watson_insights",
      "description": "Use IBM Watson to surface actionable insights from the content of messages",
      "date_updated": "2017-02-14T06:41:13Z",
      "friendly_name": "IBM Watson Message Insights",
      "url": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6",
      "sid": "XE6aa09d8b036d2acf9c6d50a627f3c4d6",
      "date_created": "2016-10-18T21:26:04Z",
      "configuration": "{}",
      "links": {
        "extensions": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions",
        "available_add_on": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88"
      }
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://preview.twilio.com/marketplace/InstalledAddOns?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://preview.twilio.com/marketplace/InstalledAddOns?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "installed_add_ons"
  }
}
SDK Version:
  • 6.x
Format:
  • py
  • JSON
# Download the Python helper library from twilio.com/docs/python/install
# NOTE : This API requires the Next-gen (v6.x) helper library. 
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

add_on = client.preview.installed_add_ons.get(sid="XE6aa09d8b036d2acf9c6d50a627f3c4d6").fetch()
print add_on.friendly_name
curl https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6 -u "{TwilioAccountSid}:{TwilioAuthToken}"
IBM Watson Message Insights
{
  "unique_name": "ibm_watson_insights",
  "description": "Use IBM Watson to surface actionable insights from the content of messages",
  "date_updated": "2017-02-11T05:06:00Z",
  "friendly_name": "IBM Watson Message Insights",
  "url": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6",
  "sid": "XE6aa09d8b036d2acf9c6d50a627f3c4d6",
  "date_created": "2016-10-18T21:26:04Z",
  "configuration": "{}",
  "links": {
    "extensions": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions",
    "available_add_on": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88"
  }
}
SDK Version:
  • 6.x
Format:
  • py
  • JSON
# Download the Python helper library from twilio.com/docs/python/install
# NOTE : This API requires the Next-gen (v6.x) helper library. 
from twilio.rest import Client
import json

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

#Note that installing an Add-on does not automatically enable it. You will need to enable it for specific "extensions" after installation.

# Install the Twilio Caller Name Add-on on this account. 
installed_add_on = client.preview.installed_add_ons.create(available_add_on_sid="XB425fefe9344ee54c704cb03685e24941", 
                                                             accept_terms_of_service=True)
print installed_add_on.friendly_name, installed_add_on.unique_name, installed_add_on.sid

# Install the IBM Watson Speech to Text Add-on (with Configuration data) on this account.
ibm_watson_stt_configuration = { 
    'callback_method': 'POST',
    'callback_url': 'https://change.this.to.your.callback.url',
    'include-keywords': True,
    'include-topics': True
    }
installed_add_on = client.preview.installed_add_ons.create(available_add_on_sid="XB85b56ed9ce713e0ac62342b901233193", 
                                                            configuration = json.dumps(ibm_watson_stt_configuration), 
                                                            accept_terms_of_service=True)
print installed_add_on.friendly_name, installed_add_on.unique_name, installed_add_on.sid
curl -X POST https://preview.twilio.com/marketplace/InstalledAddOns --data "AvailableAddOnSid=XBac2c99d9c684a765ced0b18cf0e5e1c7&AcceptTermsOfService=true" -u "{TwilioAccountSid}:{TwilioAuthToken}"
Twilio Caller Name  twilio_caller_name  XEcd122a2e96cb55b1c29e47066c70d05b

IBM Watson Speech to Text  ibm_watson_speechtotext   XEfd4db18385a5143b3b8fd240ad40ddb7
{
  "unique_name": "Robocall_and_Spam_Blocking_Solution",
  "description": "#1 Robocall and Spam Blocking Solution",
  "date_updated": "2017-02-14T06:56:39Z",
  "friendly_name": "Marchex Clean Call",
  "url": "https://preview.twilio.com/marketplace/InstalledAddOns/XEd5be652411e9c93b8377c528296be5df",
  "sid": "XEd5be652411e9c93b8377c528296be5df",
  "date_created": "2017-02-14T06:56:39Z",
  "configuration": "{}",
  "links": {
    "extensions": "https://preview.twilio.com/marketplace/InstalledAddOns/XEd5be652411e9c93b8377c528296be5df/Extensions",
    "available_add_on": "https://preview.twilio.com/marketplace/AvailableAddOns/XBac2c99d9c684a765ced0b18cf0e5e1c7"
  }
}
Format:
  • JSON
curl -X POST https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6 --data "Configuration={}&UniqueName=ibm_watson_insights_new" -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "unique_name": "ibm_watson_insights_new",
  "description": "Use IBM Watson to surface actionable insights from the content of messages",
  "date_updated": "2017-02-14T06:41:13Z",
  "friendly_name": "IBM Watson Message Insights",
  "url": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6",
  "sid": "XE6aa09d8b036d2acf9c6d50a627f3c4d6",
  "date_created": "2016-10-18T21:26:04Z",
  "configuration": "{}",
  "links": {
    "extensions": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions",
    "available_add_on": "https://preview.twilio.com/marketplace/AvailableAddOns/XB2701032f66435fabccfc06e78bef8c88"
  }
}
SDK Version:
  • 6.x
Format:
  • py
  • JSON
# Download the Python helper library from twilio.com/docs/python/install
# NOTE : This API requires the Next-gen (v6.x) helper library. 
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

add_on = client.preview.installed_add_ons.get(sid="XE0000000000000000000000000").fetch()
for e in add_on.extensions.list():
    print e.unique_name, e.enabled
curl https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions -u "{TwilioAccountSid}:{TwilioAuthToken}"
voice-incoming False
lookup-api False
taskrouter-create-task False
{
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "extensions"
  },
  "extensions": [
    {
      "unique_name": "sms-incoming",
      "url": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions/XF6e0226602b41b7fee7b01f8ece583dd9",
      "friendly_name": "Incoming SMS Message",
      "enabled": true,
      "sid": "XF6e0226602b41b7fee7b01f8ece583dd9",
      "product_name": "Programmable SMS",
      "installed_add_on_sid": "XE6aa09d8b036d2acf9c6d50a627f3c4d6"
    }
  ]
}
Format:
  • JSON
curl https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions/XF6e0226602b41b7fee7b01f8ece583dd9 -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "unique_name": "sms-incoming",
  "url": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions/XF6e0226602b41b7fee7b01f8ece583dd9",
  "friendly_name": "Incoming SMS Message",
  "enabled": true,
  "sid": "XF6e0226602b41b7fee7b01f8ece583dd9",
  "product_name": "Programmable SMS",
  "installed_add_on_sid": "XE6aa09d8b036d2acf9c6d50a627f3c4d6"
}
SDK Version:
  • 6.x
Format:
  • JSON
# Download the Python helper library from twilio.com/docs/python/install
# NOTE : This API requires the Next-gen (v6.x) helper library. 
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

# Fetch the installed Add-on using it's installed add-on sid
installed_add_on = client.preview.installed_add_ons.get(sid="XE0000000000000000000000000").fetch()

# Enable this add-on for Lookup API
[e.update(enabled=True) for e in installed_add_on.extensions.list() if e.unique_name == u'lookup-api']

# Enable this add-on for Incoming Voice call
[e.update(enabled=True) for e in installed_add_on.extensions.list() if e.unique_name == u'incoming-voice']
curl -X POST https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions/XF6e0226602b41b7fee7b01f8ece583dd9 --data "Enabled=true" -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "unique_name": "sms-incoming",
  "url": "https://preview.twilio.com/marketplace/InstalledAddOns/XE6aa09d8b036d2acf9c6d50a627f3c4d6/Extensions/XF6e0226602b41b7fee7b01f8ece583dd9",
  "friendly_name": "Incoming SMS Message",
  "enabled": true,
  "sid": "XF6e0226602b41b7fee7b01f8ece583dd9",
  "product_name": "Programmable SMS",
  "installed_add_on_sid": "XE6aa09d8b036d2acf9c6d50a627f3c4d6"
}
Format:
  • JSON
curl https://api.twilio.com/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns.json -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "first_page_uri": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns.json?PageSize=50&Page=0",
  "end": 1,
  "previous_page_uri": null,
  "uri": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns.json?PageSize=50&Page=0",
  "page_size": 50,
  "assigned_add_ons": [
    {
      "unique_name": "marchex_cleancall",
      "description": "#1 Robocall and Spam Blocking Solution",
      "date_updated": "Mon, 09 Jan 2017 18:37:18 +0000",
      "friendly_name": "Marchex Clean Call",
      "uri": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1.json",
      "account_sid": "ACfc7e27959afd07eadf83835b2dd23124e",
      "sid": "XE04586879da5bbe574f946ad41126b6c1",
      "date_created": "Mon, 09 Jan 2017 18:37:18 +0000",
      "configuration": {
        
      }
  ],
  "start": 0,
  "next_page_uri": null,
  "page": 0
}
Format:
  • JSON
curl https://api.twilio.com/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1.json -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "unique_name": "marchex_cleancall",
  "description": "#1 Robocall and Spam Blocking Solution",
  "date_updated": "Mon, 09 Jan 2017 18:37:18 +0000",
  "friendly_name": "Marchex Clean Call",
  "uri": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1.json",
  "account_sid": "ACfc7e27959afd07eadf83835b2dd23124e",
  "sid": "XE04586879da5bbe574f946ad41126b6c1",
  "date_created": "Mon, 09 Jan 2017 18:37:18 +0000",
  "configuration": {
    
  },
  "resource_sid": "PNed5f7b8de9cd35581e8d6839e591aa23",
  "subresource_uris": {
    "extensions": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1/Extensions.json"
  }
}
SDK Version:
  • 6.x
Format:
  • JSON
# Download the Python helper library from twilio.com/docs/python/install
# NOTE : This API requires the Next-gen (v6.x) helper library. 
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)


# Install the Twilio Caller Name Add-on on this account. 
#Note that installing an Add-on does not automatically enable it. You will need to enable it for specific "extensions" after installation.
installed_add_on = client.preview.installed_add_ons.create(available_add_on_sid="XB425fefe9344ee54c704cb03685e24941", 
                                                           accept_terms_of_service=True)


# Or Fetch an already installed Add-on using it's installed add-on sid
installed_add_on = client.preview.installed_add_ons.get(sid="XE0000000000000000000000000").fetch()


# Associate this Add-on only for a specific phone number.
incoming_number = client.account.incoming_phone_numbers.get(sid="PNxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
incoming_number.assigned_add_ons.create(installed_add_on_sid="XE0000000000000000000000000")

# At this point, enabling this Add-on will enable it for specific phone number only.
[e.update(enabled=True) for e in installed_add_on.extensions.list() if e.unique_name == u'incoming-voice']
curl -X POST https://api.twilio.com/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns.json --data "InstalledAddOnSid=XE77f2de43838a5a4a4ba8fcd80205dfcb" -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "unique_name": "ibm_watson_sentiment",
  "description": "Use IBM Watson to identify positive/negative sentiment from messages",
  "date_updated": "Mon, 09 Jan 2017 18:30:52 +0000",
  "friendly_name": "IBM Watson Message Sentiment",
  "uri": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE77f2de43838a5a4a4ba8fcd80205dfcb.json",
  "account_sid": "ACfc7e27959afd07eadf83835b2dd23124e",
  "sid": "XE77f2de43838a5a4a4ba8fcd80205dfcb",
  "date_created": "Mon, 09 Jan 2017 18:30:52 +0000",
  "configuration": {    
  },
  "resource_sid": "PNed5f7b8de9cd35581e8d6839e591aa23",
  "subresource_uris": {
    "extensions": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE77f2de43838a5a4a4ba8fcd80205dfcb/Extensions.json"
  }
}
Format:
  • JSON
curl https://api.twilio.com/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1/Extensions.json -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "first_page_uri": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1/Extensions.json?PageSize=50&Page=0",
  "end": 2,
  "previous_page_uri": null,
  "uri": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1/Extensions.json?PageSize=50&Page=0",
  "page_size": 50,
  "start": 0,
  "extensions": [
    {
      "unique_name": "voice-incoming",
      "resource_sid": "PNed5f7b8de9cd35581e8d6839e591aa23",
      "enabled": true,
      "friendly_name": "Incoming Voice Call",
      "uri": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1/Extensions/XF025b77384a62367bd120b7ce60250d7b.json",
      "account_sid": "ACfc7e27959afd07eadf83835b2dd23124e",
      "assigned_add_on_sid": "XE04586879da5bbe574f946ad41126b6c1",
      "sid": "XF025b77384a62367bd120b7ce60250d7b",
      "product_name": "Programmable Voice"
    }
  ],
  "next_page_uri": null,
  "page": 0
}
Format:
  • JSON
curl https://api.twilio.com/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1/Extensions/XF025b77384a62367bd120b7ce60250d7b.json -u "{TwilioAccountSid}:{TwilioAuthToken}"
{
  "unique_name": "voice-incoming",
  "resource_sid": "PNed5f7b8de9cd35581e8d6839e591aa23",
  "enabled": true,
  "friendly_name": "Incoming Voice Call",
  "uri": "/2010-04-01/Accounts/ACfc7e27959afd07eadf83835b2dd23124e/IncomingPhoneNumbers/PNed5f7b8de9cd35581e8d6839e591aa23/AssignedAddOns/XE04586879da5bbe574f946ad41126b6c1/Extensions/XF025b77384a62367bd120b7ce60250d7b.json",
  "account_sid": "ACfc7e27959afd07eadf83835b2dd23124e",
  "assigned_add_on_sid": "XE04586879da5bbe574f946ad41126b6c1",
  "sid": "XF025b77384a62367bd120b7ce60250d7b",
  "product_name": "Programmable Voice"
}