# TrustProductChannelEndpointAssignment Resource

## ChannelEndpointAssignment Properties

```json
{"type":"object","refName":"trusthub.v1.trust_product.trust_product_channel_endpoint_assignment","modelName":"trusthub_v1_trust_product_trust_product_channel_endpoint_assignment","properties":{"sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^RA[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string that we created to identify the Item Assignment resource."},"trust_product_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^BU[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string that we created to identify the CustomerProfile resource."},"account_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$","nullable":true,"description":"The SID of the [Account](/docs/iam/api/account) that created the Item Assignment resource."},"channel_endpoint_type":{"type":"string","nullable":true,"description":"The type of channel endpoint. eg: phone-number"},"channel_endpoint_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^[a-zA-Z]{2}[0-9a-fA-F]{32}$","nullable":true,"description":"The SID of an channel endpoint"},"date_created":{"type":"string","format":"date-time","nullable":true,"description":"The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"url":{"type":"string","format":"uri","nullable":true,"description":"The absolute URL of the Identity resource."}}}
```

## Create a new Assigned Item.

`POST https://trusthub.twilio.com/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments`

### Path parameters

```json
[{"name":"TrustProductSid","in":"path","description":"The unique string that we created to identify the CustomerProfile resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^BU[0-9a-fA-F]{32}$"},"required":true}]
```

### Request body parameters

```json
{"schema":{"type":"object","title":"CreateTrustProductChannelEndpointAssignmentRequest","required":["ChannelEndpointType","ChannelEndpointSid"],"properties":{"ChannelEndpointType":{"type":"string","description":"The type of channel endpoint. eg: phone-number"},"ChannelEndpointSid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^[a-zA-Z]{2}[0-9a-fA-F]{32}$","description":"The SID of an channel endpoint"}}},"examples":{"create":{"value":{"lang":"json","value":"{\n  \"ChannelEndpointSid\": \"PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n  \"ChannelEndpointType\": \"phone-number\"\n}","meta":"","code":"{\n  \"ChannelEndpointSid\": \"PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n  \"ChannelEndpointType\": \"phone-number\"\n}","tokens":[["{","#C9D1D9"],"\n  ",["\"ChannelEndpointSid\"","#7EE787"],[":","#C9D1D9"]," ",["\"PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"ChannelEndpointType\"","#7EE787"],[":","#C9D1D9"]," ",["\"phone-number\"","#A5D6FF"],"\n",["}","#C9D1D9"]],"annotations":[],"themeName":"github-dark","style":{"color":"#c9d1d9","background":"#0d1117"}}}},"encodingType":"application/x-www-form-urlencoded","conditionalParameterMap":{}}
```

Create a ChannelEndpointAssignment

```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 createTrustProductChannelEndpointAssignment() {
  const trustProductsChannelEndpointAssignment = await client.trusthub.v1
    .trustProducts("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .trustProductsChannelEndpointAssignment.create({
      channelEndpointSid: "ccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      channelEndpointType: "ChannelEndpointType",
    });

  console.log(trustProductsChannelEndpointAssignment.sid);
}

createTrustProductChannelEndpointAssignment();
```

```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)

trust_products_channel_endpoint_assignment = client.trusthub.v1.trust_products(
    "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
).trust_products_channel_endpoint_assignment.create(
    channel_endpoint_type="ChannelEndpointType",
    channel_endpoint_sid="ccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
)

print(trust_products_channel_endpoint_assignment.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1.TrustProducts;
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 trustProductsChannelEndpointAssignment =
            await TrustProductsChannelEndpointAssignmentResource.CreateAsync(
                channelEndpointType: "ChannelEndpointType",
                channelEndpointSid: "ccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                pathTrustProductSid: "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

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

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

import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.trustproducts.TrustProductsChannelEndpointAssignment;

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);
        TrustProductsChannelEndpointAssignment trustProductsChannelEndpointAssignment =
            TrustProductsChannelEndpointAssignment
                .creator(
                    "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "ChannelEndpointType", "ccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
                .create();

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

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

import (
	"fmt"
	"github.com/twilio/twilio-go"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.CreateTrustProductChannelEndpointAssignmentParams{}
	params.SetChannelEndpointType("ChannelEndpointType")
	params.SetChannelEndpointSid("ccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")

	resp, err := client.TrusthubV1.CreateTrustProductChannelEndpointAssignment("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		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);

$trust_products_channel_endpoint_assignment = $twilio->trusthub->v1
    ->trustProducts("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->trustProductsChannelEndpointAssignment->create(
        "ChannelEndpointType", // ChannelEndpointType
        "ccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" // ChannelEndpointSid
    );

print $trust_products_channel_endpoint_assignment->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)

trust_products_channel_endpoint_assignment = @client
                                             .trusthub
                                             .v1
                                             .trust_products('BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                             .trust_products_channel_endpoint_assignment
                                             .create(
                                               channel_endpoint_type: 'ChannelEndpointType',
                                               channel_endpoint_sid: 'ccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
                                             )

puts trust_products_channel_endpoint_assignment.sid
```

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

twilio api:trusthub:v1:trust-products:channel-endpoint-assignments:create \
   --trust-product-sid BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
   --channel-endpoint-type ChannelEndpointType \
   --channel-endpoint-sid ccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X POST "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments" \
--data-urlencode "ChannelEndpointType=ChannelEndpointType" \
--data-urlencode "ChannelEndpointSid=ccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "trust_product_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "channel_endpoint_sid": "ccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "channel_endpoint_type": "ChannelEndpointType",
  "date_created": "2019-07-31T02:34:41Z",
  "url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

## Fetch specific Assigned Item Instance.

`GET https://trusthub.twilio.com/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments/{Sid}`

### Path parameters

```json
[{"name":"TrustProductSid","in":"path","description":"The unique string that we created to identify the CustomerProfile resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^BU[0-9a-fA-F]{32}$"},"required":true},{"name":"Sid","in":"path","description":"The unique string that we created to identify the resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^RA[0-9a-fA-F]{32}$"},"required":true}]
```

Fetch a ChannelEndpointAssignment

```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 fetchTrustProductChannelEndpointAssignment() {
  const trustProductsChannelEndpointAssignment = await client.trusthub.v1
    .trustProducts("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .trustProductsChannelEndpointAssignment(
      "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    )
    .fetch();

  console.log(trustProductsChannelEndpointAssignment.sid);
}

fetchTrustProductChannelEndpointAssignment();
```

```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)

trust_products_channel_endpoint_assignment = (
    client.trusthub.v1.trust_products("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .trust_products_channel_endpoint_assignment(
        "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    )
    .fetch()
)

print(trust_products_channel_endpoint_assignment.sid)
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1.TrustProducts;
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 trustProductsChannelEndpointAssignment =
            await TrustProductsChannelEndpointAssignmentResource.FetchAsync(
                pathTrustProductSid: "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                pathSid: "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

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

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

import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.trustproducts.TrustProductsChannelEndpointAssignment;

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);
        TrustProductsChannelEndpointAssignment trustProductsChannelEndpointAssignment =
            TrustProductsChannelEndpointAssignment
                .fetcher("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
                .fetch();

        System.out.println(trustProductsChannelEndpointAssignment.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.TrusthubV1.FetchTrustProductChannelEndpointAssignment("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
	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);

$trust_products_channel_endpoint_assignment = $twilio->trusthub->v1
    ->trustProducts("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->trustProductsChannelEndpointAssignment(
        "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    )
    ->fetch();

print $trust_products_channel_endpoint_assignment->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)

trust_products_channel_endpoint_assignment = @client
                                             .trusthub
                                             .v1
                                             .trust_products('BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                             .trust_products_channel_endpoint_assignment('RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                             .fetch

puts trust_products_channel_endpoint_assignment.sid
```

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

twilio api:trusthub:v1:trust-products:channel-endpoint-assignments:fetch \
   --trust-product-sid BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
   --sid RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X GET "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "trust_product_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "channel_endpoint_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "channel_endpoint_type": "phone-number",
  "date_created": "2019-07-31T02:34:41Z",
  "url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
```

## Retrieve a list of all Assigned Items for an account.

`GET https://trusthub.twilio.com/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments`

### Path parameters

```json
[{"name":"TrustProductSid","in":"path","description":"The unique string that we created to identify the CustomerProfile resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^BU[0-9a-fA-F]{32}$"},"required":true}]
```

### Query parameters

```json
[{"name":"ChannelEndpointSid","in":"query","description":"The SID of an channel endpoint","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^[a-zA-Z]{2}[0-9a-fA-F]{32}$"},"examples":{"readFull":{"value":"PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}}},{"name":"ChannelEndpointSids","in":"query","description":"comma separated list of channel endpoint sids","schema":{"type":"string"}},{"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","format":"int64","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"}}]
```

List multiple ChannelEndpointAssignments

```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 listTrustProductChannelEndpointAssignment() {
  const trustProductsChannelEndpointAssignments = await client.trusthub.v1
    .trustProducts("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .trustProductsChannelEndpointAssignment.list({ limit: 20 });

  trustProductsChannelEndpointAssignments.forEach((t) => console.log(t.sid));
}

listTrustProductChannelEndpointAssignment();
```

```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)

trust_products_channel_endpoint_assignments = client.trusthub.v1.trust_products(
    "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
).trust_products_channel_endpoint_assignment.list(limit=20)

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

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1.TrustProducts;
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 trustProductsChannelEndpointAssignments =
            await TrustProductsChannelEndpointAssignmentResource.ReadAsync(
                pathTrustProductSid: "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", limit: 20);

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

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

import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.trustproducts.TrustProductsChannelEndpointAssignment;
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<TrustProductsChannelEndpointAssignment> trustProductsChannelEndpointAssignments =
            TrustProductsChannelEndpointAssignment.reader("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").limit(20).read();

        for (TrustProductsChannelEndpointAssignment record : trustProductsChannelEndpointAssignments) {
            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"
	trusthub "github.com/twilio/twilio-go/rest/trusthub/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 := &trusthub.ListTrustProductChannelEndpointAssignmentParams{}
	params.SetLimit(20)

	resp, err := client.TrusthubV1.ListTrustProductChannelEndpointAssignment("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		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);

$trustProductsChannelEndpointAssignments = $twilio->trusthub->v1
    ->trustProducts("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->trustProductsChannelEndpointAssignment->read([], 20);

foreach ($trustProductsChannelEndpointAssignments 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)

trust_products_channel_endpoint_assignments = @client
                                              .trusthub
                                              .v1
                                              .trust_products('BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                                              .trust_products_channel_endpoint_assignment
                                              .list(limit: 20)

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

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

twilio api:trusthub:v1:trust-products:channel-endpoint-assignments:list \
   --trust-product-sid BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X GET "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "results": [],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "results"
  }
}
```

## Remove an Assignment Item Instance.

`DELETE https://trusthub.twilio.com/v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments/{Sid}`

### Path parameters

```json
[{"name":"TrustProductSid","in":"path","description":"The unique string that we created to identify the CustomerProfile resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^BU[0-9a-fA-F]{32}$"},"required":true},{"name":"Sid","in":"path","description":"The unique string that we created to identify the resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^RA[0-9a-fA-F]{32}$"},"required":true}]
```

Delete a ChannelEndpointAssignment

```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 deleteTrustProductChannelEndpointAssignment() {
  await client.trusthub.v1
    .trustProducts("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .trustProductsChannelEndpointAssignment(
      "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    )
    .remove();
}

deleteTrustProductChannelEndpointAssignment();
```

```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)

client.trusthub.v1.trust_products(
    "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
).trust_products_channel_endpoint_assignment(
    "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
).delete()
```

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

using System;
using Twilio;
using Twilio.Rest.Trusthub.V1.TrustProducts;
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);

        await TrustProductsChannelEndpointAssignmentResource.DeleteAsync(
            pathTrustProductSid: "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            pathSid: "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
    }
}
```

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

import com.twilio.Twilio;
import com.twilio.rest.trusthub.v1.trustproducts.TrustProductsChannelEndpointAssignment;

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);
        TrustProductsChannelEndpointAssignment
            .deleter("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
            .delete();
    }
}
```

```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()

	err := client.TrusthubV1.DeleteTrustProductChannelEndpointAssignment("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	}
}
```

```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);

$twilio->trusthub->v1
    ->trustProducts("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->trustProductsChannelEndpointAssignment(
        "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    )
    ->delete();
```

```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)

@client
  .trusthub
  .v1
  .trust_products('BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
  .trust_products_channel_endpoint_assignment('RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
  .delete
```

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

twilio api:trusthub:v1:trust-products:channel-endpoint-assignments:remove \
   --trust-product-sid BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
   --sid RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X DELETE "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```
