CustomerProfileChannelEndpointAssignment Resource
The unique string that we created to identify the Item Assignment resource.
^RA[0-9a-fA-F]{32}$Min length: 34Max length: 34The unique string that we created to identify the CustomerProfile resource.
^BU[0-9a-fA-F]{32}$Min length: 34Max length: 34The SID of the Account that created the Item Assignment resource.
^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34The SID of an channel endpoint
^[a-zA-Z]{2}[0-9a-fA-F]{32}$Min length: 34Max length: 34The date and time in GMT when the resource was created specified in ISO 8601 format.
The absolute URL of the Identity resource.
POST https://trusthub.twilio.com/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments
The unique string that we created to identify the CustomerProfile resource.
^BU[0-9a-fA-F]{32}$Min length: 34Max length: 34application/x-www-form-urlencoded1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function createCustomerProfileChannelEndpointAssignment() {14const customerProfilesChannelEndpointAssignment = await client.trusthub.v115.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")16.customerProfilesChannelEndpointAssignment.create({17channelEndpointSid: "ccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",18channelEndpointType: "ChannelEndpointType",19});2021console.log(customerProfilesChannelEndpointAssignment.sid);22}2324createCustomerProfileChannelEndpointAssignment();
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}
GET https://trusthub.twilio.com/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments/{Sid}
The unique string that we created to identify the CustomerProfile resource.
^BU[0-9a-fA-F]{32}$Min length: 34Max length: 34The unique string that we created to identify the resource.
^RA[0-9a-fA-F]{32}$Min length: 34Max length: 341// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function fetchCustomerProfileChannelEndpointAssignment() {14const customerProfilesChannelEndpointAssignment = await client.trusthub.v115.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")16.customerProfilesChannelEndpointAssignment(17"RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",18)19.fetch();2021console.log(customerProfilesChannelEndpointAssignment.sid);22}2324fetchCustomerProfileChannelEndpointAssignment();
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}
GET https://trusthub.twilio.com/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments
The unique string that we created to identify the CustomerProfile resource.
^BU[0-9a-fA-F]{32}$Min length: 34Max length: 34The SID of an channel endpoint
^[a-zA-Z]{2}[0-9a-fA-F]{32}$Min length: 34Max length: 34How many resources to return in each list page. The default is 50, and the maximum is 1000.
1Maximum: 1000The page token. This is provided by the API.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function listCustomerProfileChannelEndpointAssignment() {14const customerProfilesChannelEndpointAssignments = await client.trusthub.v115.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")16.customerProfilesChannelEndpointAssignment.list({ limit: 20 });1718customerProfilesChannelEndpointAssignments.forEach((c) => console.log(c.sid));19}2021listCustomerProfileChannelEndpointAssignment();
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}
DELETE https://trusthub.twilio.com/v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments/{Sid}
The unique string that we created to identify the CustomerProfile resource.
^BU[0-9a-fA-F]{32}$Min length: 34Max length: 34The unique string that we created to identify the resource.
^RA[0-9a-fA-F]{32}$Min length: 34Max length: 341// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function deleteCustomerProfileChannelEndpointAssignment() {14await client.trusthub.v115.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")16.customerProfilesChannelEndpointAssignment(17"RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",18)19.remove();20}2122deleteCustomerProfileChannelEndpointAssignment();