# Installed Add-ons Extensions Subresource

> \[!WARNING]
>
> The Preview API for this resource is deprecated. To migrate from Preview to V1, refer to the Marketplace API migration guide for [users](/docs/marketplace/listings/api-migration-users) or [publishers](/docs/marketplace/publishers/api-migration-publishers).

This subresource of the [Installed Add-ons resource](/docs/marketplace/api/installed-add-ons) allows users to fetch an Extension, view a list of Extensions, or update an Extension associated with an Installed Add-on Listing. An Extension describes the specific feature or API endpoint of a Twilio product in which an Add-on Listing can be used. Extensions are disabled by default, and can be enabled using Update endpoint.

> \[!NOTE]
>
> 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

```json
{"type":"object","refName":"marketplace.v1.installed_add_on.installed_add_on_extension","modelName":"marketplace_v1_installed_add_on_installed_add_on_extension","properties":{"sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^XF[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string that we created to identify the InstalledAddOn Extension resource."},"installed_add_on_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^XE[0-9a-fA-F]{32}$","nullable":true,"description":"The SID of the InstalledAddOn resource to which this extension applies."},"friendly_name":{"type":"string","nullable":true,"description":"The string that you assigned to describe the resource."},"product_name":{"type":"string","nullable":true,"description":"The name of the Product this Extension is used within."},"unique_name":{"type":"string","nullable":true,"description":"An application-defined string that uniquely identifies the resource."},"enabled":{"type":"boolean","nullable":true,"description":"Whether the Extension will be invoked."},"url":{"type":"string","format":"uri","nullable":true,"description":"The absolute URL of the resource."}}}
```

## Fetch an instance of an Extension for the Installed Add-on.

`GET https://marketplace.twilio.com/v1/InstalledAddOns/{InstalledAddOnSid}/Extensions/{Sid}`

### Path parameters

```json
[{"name":"InstalledAddOnSid","in":"path","description":"The SID of the InstalledAddOn resource with the extension to fetch.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^XE[0-9a-fA-F]{32}$"},"required":true},{"name":"Sid","in":"path","description":"The SID of the InstalledAddOn Extension resource to fetch.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^XF[0-9a-fA-F]{32}$"},"required":true}]
```

This endpoint returns details on a given Extension associated with a given Installed Add-on.

Fetch an Extension

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function fetchInstalledAddOnExtension() {
  const extension = await client.marketplace.v1
    .installedAddOns("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .extensions("XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .fetch();

  console.log(extension.sid);
}

fetchInstalledAddOnExtension();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

extension = (
    client.marketplace.v1.installed_add_ons(
        "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    )
    .extensions("XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .fetch()
)

print(extension.sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Marketplace.V1.InstalledAddOn;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var installedAddOnExtension = await InstalledAddOnExtensionResource.FetchAsync(
            pathInstalledAddOnSid: "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            pathSid: "XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

        Console.WriteLine(installedAddOnExtension.Sid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.marketplace.v1.installedaddon.InstalledAddOnExtension;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        InstalledAddOnExtension installedAddOnExtension =
            InstalledAddOnExtension.fetcher("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
                .fetch();

        System.out.println(installedAddOnExtension.getSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	resp, err := client.MarketplaceV1.FetchInstalledAddOnExtension("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$extension = $twilio->marketplace->v1
    ->installedAddOns("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->extensions("XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->fetch();

print $extension->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

extension = @client
            .marketplace
            .v1
            .installed_add_ons('XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
            .extensions('XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
            .fetch

puts extension.sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:marketplace:v1:installed-add-ons:extensions:fetch \
   --installed-add-on-sid XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
   --sid XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X GET "https://marketplace.twilio.com/v1/InstalledAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions/XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "installed_add_on_sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "friendly_name": "Incoming Voice Call",
  "product_name": "Programmable Voice",
  "unique_name": "voice-incoming",
  "enabled": true,
  "url": "https://marketplace.twilio.com/v1/InstalledAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions/XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

## Retrieve a list of Extensions for the Installed Add-on.

`GET https://marketplace.twilio.com/v1/InstalledAddOns/{InstalledAddOnSid}/Extensions`

### Path parameters

```json
[{"name":"InstalledAddOnSid","in":"path","description":"The SID of the InstalledAddOn resource with the extensions to read.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^XE[0-9a-fA-F]{32}$"},"required":true}]
```

### Query parameters

```json
[{"name":"PageSize","in":"query","description":"How many resources to return in each list page. The default is 50, and the maximum is 1000.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"Page","in":"query","description":"The page index. This value is simply for client state.","schema":{"type":"integer","minimum":0}},{"name":"PageToken","in":"query","description":"The page token. This is provided by the API.","schema":{"type":"string"}}]
```

This endpoint returns all Extensions associated with a given Installed Add-on.

List multiple Extensions

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function listInstalledAddOnExtension() {
  const extensions = await client.marketplace.v1
    .installedAddOns("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .extensions.list({ limit: 20 });

  extensions.forEach((e) => console.log(e.sid));
}

listInstalledAddOnExtension();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

extensions = client.marketplace.v1.installed_add_ons(
    "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
).extensions.list(limit=20)

for record in extensions:
    print(record.sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Marketplace.V1.InstalledAddOn;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var installedAddOnExtensions = await InstalledAddOnExtensionResource.ReadAsync(
            pathInstalledAddOnSid: "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", limit: 20);

        foreach (var record in installedAddOnExtensions) {
            Console.WriteLine(record.Sid);
        }
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.marketplace.v1.installedaddon.InstalledAddOnExtension;
import com.twilio.base.ResourceSet;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<InstalledAddOnExtension> installedAddOnExtensions =
            InstalledAddOnExtension.reader("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").limit(20).read();

        for (InstalledAddOnExtension record : installedAddOnExtensions) {
            System.out.println(record.getSid());
        }
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	marketplace "github.com/twilio/twilio-go/rest/marketplace/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &marketplace.ListInstalledAddOnExtensionParams{}
	params.SetLimit(20)

	resp, err := client.MarketplaceV1.ListInstalledAddOnExtension("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		for record := range resp {
			if resp[record].Sid != nil {
				fmt.Println(*resp[record].Sid)
			} else {
				fmt.Println(resp[record].Sid)
			}
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$extensions = $twilio->marketplace->v1
    ->installedAddOns("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->extensions->read(20);

foreach ($extensions as $record) {
    print $record->sid;
}
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

extensions = @client
             .marketplace
             .v1
             .installed_add_ons('XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
             .extensions
             .list(limit: 20)

extensions.each do |record|
   puts record.sid
end
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:marketplace:v1:installed-add-ons:extensions:list \
   --installed-add-on-sid XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X GET "https://marketplace.twilio.com/v1/InstalledAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "extensions": [
    {
      "sid": "XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "installed_add_on_sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "friendly_name": "Incoming Voice Call",
      "product_name": "Programmable Voice",
      "unique_name": "voice-incoming",
      "enabled": true,
      "url": "https://marketplace.twilio.com/v1/InstalledAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions/XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://marketplace.twilio.com/v1/InstalledAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://marketplace.twilio.com/v1/InstalledAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "extensions"
  }
}
```

## Update an Extension for an Add-on installation.

`POST https://marketplace.twilio.com/v1/InstalledAddOns/{InstalledAddOnSid}/Extensions/{Sid}`

### Path parameters

```json
[{"name":"InstalledAddOnSid","in":"path","description":"The SID of the InstalledAddOn resource with the extension to update.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^XE[0-9a-fA-F]{32}$"},"required":true},{"name":"Sid","in":"path","description":"The SID of the InstalledAddOn Extension resource to update.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^XF[0-9a-fA-F]{32}$"},"required":true}]
```

### Request body parameters

```json
{"schema":{"type":"object","title":"UpdateInstalledAddOnExtensionRequest","required":["Enabled"],"properties":{"Enabled":{"type":"boolean","description":"Whether the Extension should be invoked."}}},"examples":{"update":{"value":{"lang":"json","value":"{\n  \"Enabled\": false\n}","meta":"","code":"{\n  \"Enabled\": false\n}","tokens":[["{","#C9D1D9"],"\n  ",["\"Enabled\"","#7EE787"],[":","#C9D1D9"]," ",["false","#79C0FF"],"\n",["}","#C9D1D9"]],"annotations":[],"themeName":"github-dark","style":{"color":"#c9d1d9","background":"#0d1117"}}}},"encodingType":"application/x-www-form-urlencoded","conditionalParameterMap":{}}
```

This endpoint updates the data of a given Extension associated with a given Installed Add-on, allowing you to enable or disable the Extension.

Update an Extension

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function updateInstalledAddOnExtension() {
  const extension = await client.marketplace.v1
    .installedAddOns("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .extensions("XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .update({ enabled: false });

  console.log(extension.sid);
}

updateInstalledAddOnExtension();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

installed_add_on_extension = (
    client.marketplace.v1.installed_add_ons(
        "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    )
    .extensions("XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .update(enabled=False)
)

print(installed_add_on_extension.sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Marketplace.V1.InstalledAddOn;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var installedAddOnExtension = await InstalledAddOnExtensionResource.UpdateAsync(
            enabled: false,
            pathInstalledAddOnSid: "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            pathSid: "XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

        Console.WriteLine(installedAddOnExtension.Sid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.marketplace.v1.installedaddon.InstalledAddOnExtension;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        InstalledAddOnExtension installedAddOnExtension =
            InstalledAddOnExtension
                .updater("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", false)
                .update();

        System.out.println(installedAddOnExtension.getSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	marketplace "github.com/twilio/twilio-go/rest/marketplace/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &marketplace.UpdateInstalledAddOnExtensionParams{}
	params.SetEnabled(false)

	resp, err := client.MarketplaceV1.UpdateInstalledAddOnExtension("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$installed_add_on_extension = $twilio->marketplace->v1
    ->installedAddOns("XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->extensions("XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->update(
        false // Enabled
    );

print $installed_add_on_extension->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

extension = @client
            .marketplace
            .v1
            .installed_add_ons('XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
            .extensions('XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
            .update(enabled: false)

puts extension.sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:marketplace:v1:installed-add-ons:extensions:update \
   --installed-add-on-sid XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
   --sid XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
   --enabled
```

```bash
curl -X POST "https://marketplace.twilio.com/v1/InstalledAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions/XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
--data-urlencode "Enabled=false" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "installed_add_on_sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "friendly_name": "Incoming Voice Call",
  "product_name": "Programmable Voice",
  "unique_name": "voice-incoming",
  "enabled": false,
  "url": "https://marketplace.twilio.com/v1/InstalledAddOns/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Extensions/XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```
