Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

CustomerProfileChannelEndpointAssignment Resource



CustomerProfileChannelEndpointAssignment Properties

customerprofilechannelendpointassignment-properties page anchor
Property nameTypePIIDescription
sidSID<RA>
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

customer_profile_sidSID<BU>

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

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

account_sidSID<AC>

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

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

channel_endpoint_typestring

The type of channel endpoint. eg: phone-number


channel_endpoint_sidSID

The SID of an channel endpoint

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

urlstring<uri>

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
Property nameTypeRequiredPIIDescription
ChannelEndpointTypestringrequired

The type of channel endpoint. eg: phone-number


ChannelEndpointSidSIDrequired

The SID of an channel endpoint

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

Create a CustomerProfileChannelEndpointAssignment

create-a-customerprofilechannelendpointassignment page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_21
// Download the helper library from https://www.twilio.com/docs/node/install
_21
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_21
_21
// Find your Account SID and Auth Token at twilio.com/console
_21
// and set the environment variables. See http://twil.io/secure
_21
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_21
const authToken = process.env.TWILIO_AUTH_TOKEN;
_21
const client = twilio(accountSid, authToken);
_21
_21
async function createCustomerProfileChannelEndpointAssignment() {
_21
const customerProfilesChannelEndpointAssignment = await client.trusthub.v1
_21
.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_21
.customerProfilesChannelEndpointAssignment.create({
_21
channelEndpointSid: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_21
channelEndpointType: "ChannelEndpointType",
_21
});
_21
_21
console.log(customerProfilesChannelEndpointAssignment.sid);
_21
}
_21
_21
createCustomerProfileChannelEndpointAssignment();

Output

_10
{
_10
"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"customer_profile_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"channel_endpoint_sid": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"channel_endpoint_type": "ChannelEndpointType",
_10
"date_created": "2019-07-31T02:34:41Z",
_10
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_10
}


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

Fetch a CustomerProfileChannelEndpointAssignment

fetch-a-customerprofilechannelendpointassignment page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_21
// Download the helper library from https://www.twilio.com/docs/node/install
_21
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_21
_21
// Find your Account SID and Auth Token at twilio.com/console
_21
// and set the environment variables. See http://twil.io/secure
_21
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_21
const authToken = process.env.TWILIO_AUTH_TOKEN;
_21
const client = twilio(accountSid, authToken);
_21
_21
async function fetchCustomerProfileChannelEndpointAssignment() {
_21
const customerProfilesChannelEndpointAssignment = await client.trusthub.v1
_21
.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_21
.customerProfilesChannelEndpointAssignment(
_21
"RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_21
)
_21
.fetch();
_21
_21
console.log(customerProfilesChannelEndpointAssignment.sid);
_21
}
_21
_21
fetchCustomerProfileChannelEndpointAssignment();

Output

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


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
ChannelEndpointSidSIDOptional

The SID of an channel endpoint

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

ChannelEndpointSidsstringOptional

comma separated list of channel endpoint sids


PageSizeintegerOptional

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

Minimum: 1Maximum: 1000

PageintegerOptional

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

Minimum: 0

PageTokenstringOptional

The page token. This is provided by the API.

List multiple CustomerProfileChannelEndpointAssignments

list-multiple-customerprofilechannelendpointassignments page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function listCustomerProfileChannelEndpointAssignment() {
_18
const customerProfilesChannelEndpointAssignments = await client.trusthub.v1
_18
.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18
.customerProfilesChannelEndpointAssignment.list({ limit: 20 });
_18
_18
customerProfilesChannelEndpointAssignments.forEach((c) => console.log(c.sid));
_18
}
_18
_18
listCustomerProfileChannelEndpointAssignment();

Output

_12
{
_12
"results": [],
_12
"meta": {
_12
"page": 0,
_12
"page_size": 50,
_12
"first_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?PageSize=50&Page=0",
_12
"previous_page_url": null,
_12
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?PageSize=50&Page=0",
_12
"next_page_url": null,
_12
"key": "results"
_12
}
_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

Delete a CustomerProfileChannelEndpointAssignment

delete-a-customerprofilechannelendpointassignment page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_19
// Download the helper library from https://www.twilio.com/docs/node/install
_19
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19
_19
// Find your Account SID and Auth Token at twilio.com/console
_19
// and set the environment variables. See http://twil.io/secure
_19
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19
const authToken = process.env.TWILIO_AUTH_TOKEN;
_19
const client = twilio(accountSid, authToken);
_19
_19
async function deleteCustomerProfileChannelEndpointAssignment() {
_19
await client.trusthub.v1
_19
.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_19
.customerProfilesChannelEndpointAssignment(
_19
"RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_19
)
_19
.remove();
_19
}
_19
_19
deleteCustomerProfileChannelEndpointAssignment();


Rate this page: