CustomerProfile Resource
The unique string that we created to identify the Customer-Profile resource.
^BU[0-9a-fA-F]{32}$Min length: 34Max length: 34The SID of the Account that created the Customer-Profile resource.
^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34The unique string of a policy that is associated to the Customer-Profile resource.
^RN[0-9a-fA-F]{32}$Min length: 34Max length: 34The verification status of the Customer-Profile resource.
draftpending-reviewin-reviewtwilio-rejectedtwilio-approvedThe date and time in GMT in ISO 8601 format when the resource will be valid until.
The email address that will receive updates when the Customer-Profile resource changes status.
The URL we call to inform your application of status changes.
The date and time in GMT when the resource was created specified in ISO 8601 format.
The date and time in GMT when the resource was last updated specified in ISO 8601 format.
The error codes associated with the rejection of the Customer-Profile.
POST https://trusthub.twilio.com/v1/CustomerProfiles
application/x-www-form-urlencodedThe email address that will receive updates when the Customer-Profile resource changes status.
The unique string of a policy that is associated to the Customer-Profile resource.
^RN[0-9a-fA-F]{32}$Min length: 34Max length: 34The URL we call to inform your application of status changes.
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 and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createCustomerProfile() {11const customerProfile = await client.trusthub.v1.customerProfiles.create({12email: "secondary@example.com",13friendlyName: "friendly_name",14policySid: "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",15statusCallback: "http://www.example.com",16});1718console.log(customerProfile.sid);19}2021createCustomerProfile();
Response
1{2"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"friendly_name": "friendly_name",6"status": "draft",7"email": "secondary@example.com",8"status_callback": "http://www.example.com",9"valid_until": null,10"date_created": "2019-07-30T22:29:24Z",11"date_updated": "2019-07-31T01:09:00Z",12"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",13"links": {14"customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",15"customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",16"customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"17},18"errors": null19}
GET https://trusthub.twilio.com/v1/CustomerProfiles/{Sid}
The unique string that we created to identify the Customer-Profile resource.
^BU[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 and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchCustomerProfile() {11const customerProfile = await client.trusthub.v112.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.fetch();1415console.log(customerProfile.sid);16}1718fetchCustomerProfile();
Response
1{2"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"friendly_name": "friendly_name",6"status": "draft",7"valid_until": null,8"email": "email",9"status_callback": "http://www.example.com",10"date_created": "2019-07-30T22:29:24Z",11"date_updated": "2019-07-31T01:09:00Z",12"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",13"links": {14"customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",15"customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",16"customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"17},18"errors": [19{20"code": 1860121}22]23}
GET https://trusthub.twilio.com/v1/CustomerProfiles
The verification status of the Customer-Profile resource.
draftpending-reviewin-reviewtwilio-rejectedtwilio-approvedThe unique string of a policy that is associated to the Customer-Profile resource.
^RN[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 and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listCustomerProfile() {11const customerProfiles = await client.trusthub.v1.customerProfiles.list({12friendlyName: "friendly_name",13policySid: "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",14limit: 20,15});1617customerProfiles.forEach((c) => console.log(c.sid));18}1920listCustomerProfile();
Response
1{2"results": [],3"meta": {4"page": 0,5"page_size": 50,6"first_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles?PageSize=50&Page=0",7"previous_page_url": null,8"url": "https://trusthub.twilio.com/v1/CustomerProfiles?PageSize=50&Page=0",9"next_page_url": null,10"key": "results"11}12}
POST https://trusthub.twilio.com/v1/CustomerProfiles/{Sid}
The unique string that we created to identify the Customer-Profile resource.
^BU[0-9a-fA-F]{32}$Min length: 34Max length: 34application/x-www-form-urlencodedThe verification status of the Customer-Profile resource.
draftpending-reviewin-reviewtwilio-rejectedtwilio-approvedThe URL we call to inform your application of status changes.
The email address that will receive updates when the Customer-Profile resource changes status.
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 and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function updateCustomerProfile() {11const customerProfile = await client.trusthub.v112.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.update({ status: "draft" });1415console.log(customerProfile.sid);16}1718updateCustomerProfile();
Response
1{2"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"friendly_name": "friendly_name",6"status": "draft",7"email": "email",8"status_callback": "http://www.example.com",9"valid_until": null,10"date_created": "2019-07-30T22:29:24Z",11"date_updated": "2019-07-31T01:09:00Z",12"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",13"links": {14"customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",15"customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",16"customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"17},18"errors": null19}
DELETE https://trusthub.twilio.com/v1/CustomerProfiles/{Sid}
The unique string that we created to identify the Customer-Profile resource.
^BU[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 and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function deleteCustomerProfile() {11await client.trusthub.v112.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.remove();14}1516deleteCustomerProfile();