Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this page
Looking for more inspiration?Visit the

CustomerProfileChannelEndpointAssignment Resource


ChannelEndpointAssignment Properties

channelendpointassignment-properties page anchor
Property nameTypeRequiredPIIDescriptionChild properties
sidSID<RA>

Optional

Not PII

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

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

customerProfileSidSID<BU>

Optional

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

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

accountSidSID<AC>

Optional

The SID of the Account that created the Item Assignment resource.

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

channelEndpointTypestring

Optional

The type of channel endpoint. eg: phone-number


channelEndpointSidSID

Optional

The SID of an channel endpoint

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

urlstring<uri>

Optional

The absolute URL of the Identity resource.


Create a new Assigned Item

create-a-new-assigned-item page anchor

POST https://trusthub.twilio.com/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
customerProfileSidSID<BU>
required

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

Pattern: ^BU[0-9a-fA-F]{32}$Min length: 34Max length: 34
Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredPIIDescriptionChild properties
channelEndpointTypestring
required

The type of channel endpoint. eg: phone-number


channelEndpointSidSID
required

The SID of an channel endpoint

Pattern: ^[a-zA-Z]{2}[0-9a-fA-F]{32}$Min length: 34Max length: 34
Create a new Assigned ItemLink to code sample: Create a new Assigned Item
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function createCustomerProfileChannelEndpointAssignment() {
11
const customerProfilesChannelEndpointAssignment = await client.trusthub.v1
12
.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.customerProfilesChannelEndpointAssignment.create({
14
channelEndpointSid: "ccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
15
channelEndpointType: "ChannelEndpointType",
16
});
17
18
console.log(customerProfilesChannelEndpointAssignment.sid);
19
}
20
21
createCustomerProfileChannelEndpointAssignment();

Response

Note about this response
1
{
2
"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"customer_profile_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"channel_endpoint_sid": "ccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"channel_endpoint_type": "ChannelEndpointType",
7
"date_created": "2019-07-31T02:34:41Z",
8
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
9
}

Fetch specific Assigned Item Instance

fetch-specific-assigned-item-instance page anchor

GET https://trusthub.twilio.com/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments/{Sid}

Property nameTypeRequiredPIIDescription
customerProfileSidSID<BU>
required

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

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

sidSID<RA>
required

The unique string that we created to identify the resource.

Pattern: ^RA[0-9a-fA-F]{32}$Min length: 34Max length: 34
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchCustomerProfileChannelEndpointAssignment() {
11
const customerProfilesChannelEndpointAssignment = await client.trusthub.v1
12
.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.customerProfilesChannelEndpointAssignment(
14
"RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
15
)
16
.fetch();
17
18
console.log(customerProfilesChannelEndpointAssignment.sid);
19
}
20
21
fetchCustomerProfileChannelEndpointAssignment();

Response

Note about this response
1
{
2
"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"customer_profile_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"channel_endpoint_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"channel_endpoint_type": "phone-number",
7
"date_created": "2019-07-31T02:34:41Z",
8
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
9
}

Retrieve a list of all Assigned Items for an account

retrieve-a-list-of-all-assigned-items-for-an-account page anchor

GET https://trusthub.twilio.com/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments

Property nameTypeRequiredPIIDescription
customerProfileSidSID<BU>
required

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

Pattern: ^BU[0-9a-fA-F]{32}$Min length: 34Max length: 34
Property nameTypeRequiredPIIDescription
channelEndpointSidSID

Optional

The SID of an channel endpoint

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

channelEndpointSidsstring

Optional

comma separated list of channel endpoint sids


pageSizeinteger<int64>

Optional

How many resources to return in each list page. The default is 50, and the maximum is 1000.

Minimum: 1Maximum: 1000

pageinteger

Optional

The page index. This value is simply for client state.

Minimum: 0

pageTokenstring

Optional

The page token. This is provided by the API.

Retrieve a list of all Assigned Items for an accountLink to code sample: Retrieve a list of all Assigned Items for an account
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function listCustomerProfileChannelEndpointAssignment() {
11
const customerProfilesChannelEndpointAssignments = await client.trusthub.v1
12
.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.customerProfilesChannelEndpointAssignment.list({ limit: 20 });
14
15
customerProfilesChannelEndpointAssignments.forEach((c) => console.log(c.sid));
16
}
17
18
listCustomerProfileChannelEndpointAssignment();

Response

Note about this response
1
{
2
"results": [],
3
"meta": {
4
"page": 0,
5
"page_size": 50,
6
"first_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?PageSize=50&Page=0",
7
"previous_page_url": null,
8
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?PageSize=50&Page=0",
9
"next_page_url": null,
10
"key": "results"
11
}
12
}

Remove an Assignment Item Instance

remove-an-assignment-item-instance page anchor

DELETE https://trusthub.twilio.com/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments/{Sid}

Property nameTypeRequiredPIIDescription
customerProfileSidSID<BU>
required

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

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

sidSID<RA>
required

The unique string that we created to identify the resource.

Pattern: ^RA[0-9a-fA-F]{32}$Min length: 34Max length: 34
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function deleteCustomerProfileChannelEndpointAssignment() {
11
await client.trusthub.v1
12
.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.customerProfilesChannelEndpointAssignment(
14
"RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
15
)
16
.remove();
17
}
18
19
deleteCustomerProfileChannelEndpointAssignment();