SHAKEN/STIR Onboarding with the Trust Hub REST API (Direct Customers using Subaccounts)
Learn to create and submit a SHAKEN/STIR Trust Product by using the Twilio Trust Hub REST API to send POST requests to various Trust Hub resource endpoints. You can use this guide to send voice notifications, create self-service automation, create an outbound call center, and create transcriptions for AI or ML.
See Related reference documentation to learn more about the Trust Hub REST API used in this guide.
This page walks Direct Customers using subaccounts through creating a SHAKEN/STIR Trust Product with the Trust Hub REST API.
Not a Direct Customer using subaccounts? Find the appropriate onboarding instructions below:
- Direct Customer (no Subaccounts)
- ISV/Reseller with single, top-level project
- ISV/Reseller using Subaccounts

- In Twilio Console, go to Trust Hub > Customer Profiles or Customer Profiles in the legacy Console to create your profile.
- You will only need to do this one time.
- For more information on Business Profiles and vetting, go to the Trust Hub Docs.
-
This is required before you can add a phone number to your SHAKEN/STIR Trust Product.
-
You'll need your Business Profile's SID
- To find your Business Profile SID in the Console, navigate to Trust Hub -> Customer Profiles -> View Profile Details.
- If you'd prefer to use the Trust Hub API to do this, see the Additional API Calls section.
- Business Profile SIDs start with "BU".
-
You'll also need your Phone Number SID(s) from your subaccount(s).
- To find your Phone Number SIDs in the Console, first navigate to your subaccount (Settings -> Subaccounts -> View Subaccount), then go to Phone Numbers, and click on the phone number.
- To find your Phone Number SIDs via API (you'll need your Subaccount SID(s), which can be found in the Console or via API), see the Additional API Calls Section.
- Phone Number SIDs begin with "PN".
-
In the API Call below, don't change the
ChannelEndpointType. It needs to bephone-numberto add a phone number to your Business Profile.
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 createCustomerProfileChannelEndpointAssignment() {11const customerProfilesChannelEndpointAssignment = await client.trusthub.v112.customerProfiles("YOUR_BUSINESS_PROFILE_SID")13.customerProfilesChannelEndpointAssignment.create({14channelEndpointSid: "YOUR_PHONE_NUMBER_SID",15channelEndpointType: "phone-number",16});1718console.log(customerProfilesChannelEndpointAssignment.sid);19}2021createCustomerProfileChannelEndpointAssignment();
Response
1{2"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"customer_profile_sid": "YOUR_BUSINESS_PROFILE_SID",4"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"channel_endpoint_sid": "YOUR_PHONE_NUMBER_SID",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}
- Note: Do not change the policy_sid from the example below.
- The response will contain the SID for your Trust Product. You'll need this for the next step.
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 createTrustProduct() {11const trustProduct = await client.trusthub.v1.trustProducts.create({12email: "EMAIL@EXAMPLE.COM",13friendlyName: "FRIENDLY_NAME_FOR_YOUR_TRUST_PRODUCT",14policySid: "RN7a97559effdf62d00f4298208492a5ea",15});1617console.log(trustProduct.sid);18}1920createTrustProduct();
Response
1{2"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"policy_sid": "RN7a97559effdf62d00f4298208492a5ea",5"friendly_name": "FRIENDLY_NAME_FOR_YOUR_TRUST_PRODUCT",6"status": "draft",7"email": "EMAIL@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/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",13"links": {14"trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",15"trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",16"trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"17},18"errors": null19}
- You'll need your Trust Product's SID. This was returned by the previous API call.
- You'll need your Business Profile's SID.
- To retrieve these SIDs via the API, see the Additional API Calls section below. You can also find them in the Console under Trust Hub.
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 createTrustProductEntityAssignment() {11const trustProductsEntityAssignment = await client.trusthub.v112.trustProducts("YOUR_TRUST_PRODUCT_SID")13.trustProductsEntityAssignments.create({14objectSid: "YOUR_BUSINESS_PROFILE_SID",15});1617console.log(trustProductsEntityAssignment.sid);18}1920createTrustProductEntityAssignment();
Response
1{2"sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"trust_product_sid": "YOUR_TRUST_PRODUCT_SID",4"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"object_sid": "YOUR_BUSINESS_PROFILE_SID",6"date_created": "2019-07-31T02:34:41Z",7"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"8}
- You'll need the Phone Number SID(s) you assigned to your Business Profile earlier. (Note: Only those phone numbers already assigned to your Primary Business Profile are eligible)
- You'll need your Trust Product SID used earlier.
- Don't change the
ChannelEndpointType - You can complete this step before or after submitting your SHAKEN/STIR Trust Product for vetting
- To check your Business Profile's phone numbers via API, see the Additional API Calls section below.
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 createTrustProductChannelEndpointAssignment() {11const trustProductsChannelEndpointAssignment = await client.trusthub.v112.trustProducts("YOUR_TRUST_PRODUCT_SID")13.trustProductsChannelEndpointAssignment.create({14channelEndpointSid: "YOUR_PHONE_NUMBER_SID",15channelEndpointType: "phone-number",16});1718console.log(trustProductsChannelEndpointAssignment.sid);19}2021createTrustProductChannelEndpointAssignment();
Response
1{2"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"trust_product_sid": "YOUR_TRUST_PRODUCT_SID",4"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"channel_endpoint_sid": "YOUR_PHONE_NUMBER_SID",6"channel_endpoint_type": "phone-number",7"date_created": "2019-07-31T02:34:41Z",8"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"9}
- Once it reaches Twilio-Approved status, you will be able to sign outbound calls with "A" level attestation.
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 updateTrustProduct() {11const trustProduct = await client.trusthub.v112.trustProducts("YOUR_TRUST_PRODUCT_SID")13.update({14status: "pending-review",15statusCallback: "https://www.yourcallbackuri.com/webhook",16});1718console.log(trustProduct.sid);19}2021updateTrustProduct();
Response
1{2"sid": "YOUR_TRUST_PRODUCT_SID",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"friendly_name": "friendly_name",6"status": "pending-review",7"email": "notification@email.com",8"status_callback": "https://www.yourcallbackuri.com/webhook",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/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",13"links": {14"trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",15"trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",16"trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"17},18"errors": null19}
Including the status callback URL allows Twilio to send notifications to your webhook. The status callback URL, shown in the previous example, isn't required.
Twilio sends notifications about the approval status over email and to this webhook.
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 listAccount() {11const accounts = await client.api.v2010.accounts.list({ limit: 20 });1213accounts.forEach((a) => console.log(a.end));14}1516listAccount();
Response
1{2"first_page_uri": "/2010-04-01/Accounts.json?FriendlyName=friendly_name&Status=active&PageSize=50&Page=0",3"end": 0,4"previous_page_uri": null,5"accounts": [6{7"auth_token": "auth_token",8"date_created": "Thu, 30 Jul 2015 20:00:00 +0000",9"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",10"friendly_name": "friendly_name",11"owner_account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",12"sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",13"status": "active",14"subresource_uris": {15"available_phone_numbers": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AvailablePhoneNumbers.json",16"calls": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls.json",17"conferences": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences.json",18"incoming_phone_numbers": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json",19"notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json",20"outgoing_caller_ids": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OutgoingCallerIds.json",21"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json",22"transcriptions": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Transcriptions.json",23"addresses": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses.json",24"signing_keys": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SigningKeys.json",25"connect_apps": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json",26"sip": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP.json",27"authorized_connect_apps": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AuthorizedConnectApps.json",28"usage": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Usage.json",29"keys": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Keys.json",30"applications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Applications.json",31"short_codes": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SMS/ShortCodes.json",32"queues": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Queues.json",33"messages": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages.json",34"balance": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Balance.json"35},36"type": "Full",37"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"38}39],40"uri": "/2010-04-01/Accounts.json?FriendlyName=friendly_name&Status=active&PageSize=50&Page=0",41"page_size": 50,42"start": 0,43"next_page_uri": null,44"page": 045}
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({12limit: 20,13});1415customerProfiles.forEach((c) => console.log(c.sid));16}1718listCustomerProfile();
Response
1{2"results": [3{4"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",6"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",7"friendly_name": "friendly_name",8"status": "twilio-approved",9"email": "notification@email.com",10"status_callback": "http://www.example.com",11"valid_until": "2020-07-31T01:00:00Z",12"date_created": "2019-07-30T22:29:24Z",13"date_updated": "2019-07-31T01:09:00Z",14"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",15"links": {16"customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",17"customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",18"customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"19},20"errors": [21{22"code": 1860123}24]25}26],27"meta": {28"page": 0,29"page_size": 50,30"first_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles?Status=draft&FriendlyName=friendly_name&PolicySid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",31"previous_page_url": null,32"url": "https://trusthub.twilio.com/v1/CustomerProfiles?Status=draft&FriendlyName=friendly_name&PolicySid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",33"next_page_url": null,34"key": "results"35}36}
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 listIncomingPhoneNumber() {11const incomingPhoneNumbers = await client.incomingPhoneNumbers.list({12limit: 20,13});1415incomingPhoneNumbers.forEach((i) => console.log(i.end));16}1718listIncomingPhoneNumber();
Response
1{2"end": 0,3"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0",4"incoming_phone_numbers": [5{6"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",7"address_requirements": "none",8"address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",9"api_version": "2010-04-01",10"beta": null,11"capabilities": {12"voice": true,13"sms": false,14"mms": true,15"fax": false16},17"date_created": "Thu, 30 Jul 2015 23:19:04 +0000",18"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",19"emergency_status": "Active",20"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",21"emergency_address_status": "registered",22"friendly_name": "(808) 925-5327",23"identity_sid": "RIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",24"origin": "origin",25"phone_number": "+18089255327",26"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",27"sms_application_sid": "",28"sms_fallback_method": "POST",29"sms_fallback_url": "",30"sms_method": "POST",31"sms_url": "",32"status_callback": "",33"status_callback_method": "POST",34"trunk_sid": null,35"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",36"voice_application_sid": "",37"voice_caller_id_lookup": false,38"voice_fallback_method": "POST",39"voice_fallback_url": null,40"voice_method": "POST",41"voice_url": null,42"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",43"voice_receive_mode": "voice",44"status": "in-use",45"type": "local"46}47],48"next_page_uri": null,49"page": 0,50"page_size": 50,51"previous_page_uri": null,52"start": 0,53"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0"54}
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 listTrustProduct() {11const trustProducts = await client.trusthub.v1.trustProducts.list({12limit: 20,13});1415trustProducts.forEach((t) => console.log(t.sid));16}1718listTrustProduct();
Response
1{2"results": [3{4"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",6"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",7"friendly_name": "friendly_name",8"status": "twilio-approved",9"email": "notification@email.com",10"status_callback": "http://www.example.com",11"valid_until": "2020-07-31T01:00:00Z",12"date_created": "2019-07-30T22:29:24Z",13"date_updated": "2019-07-31T01:09:00Z",14"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",15"links": {16"trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",17"trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",18"trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"19},20"errors": null21}22],23"meta": {24"page": 0,25"page_size": 50,26"first_page_url": "https://trusthub.twilio.com/v1/TrustProducts?Status=draft&FriendlyName=friendly_name&PolicySid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",27"previous_page_url": null,28"url": "https://trusthub.twilio.com/v1/TrustProducts?Status=draft&FriendlyName=friendly_name&PolicySid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",29"next_page_url": null,30"key": "results"31}32}
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 listCustomerProfileChannelEndpointAssignment() {11const customerProfilesChannelEndpointAssignments = await client.trusthub.v112.customerProfiles("YOUR_BUSINESS_PROFILE_SID")13.customerProfilesChannelEndpointAssignment.list({ limit: 20 });1415customerProfilesChannelEndpointAssignments.forEach((c) => console.log(c.sid));16}1718listCustomerProfileChannelEndpointAssignment();
Response
1{2"results": [3{4"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"customer_profile_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",6"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",7"channel_endpoint_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",8"channel_endpoint_type": "phone-number",9"date_created": "2019-07-31T02:34:41Z",10"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"11}12],13"meta": {14"page": 0,15"page_size": 50,16"first_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?ChannelEndpointSid=PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",17"previous_page_url": null,18"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?ChannelEndpointSid=PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",19"next_page_url": null,20"key": "results"21}22}
This guide teaches the basics required for the following use cases:
You can use this guide to pass cryptographic identity validation at the carrier network level, guaranteeing that your time-sensitive outbound alerts are recognized as legitimate. By leveraging SHAKEN/STIR, your urgent notifications and emergency weather closures avoid automated network blocks, ensuring they bypass "Spam Likely" labels and reach your customers immediately. To learn more advanced features that you can use with voice notifications, see Voice notifications.
You can use this guide to attach full "A-level" attestation to your outbound contact center calls, proving to terminating carriers that your business owns and has the explicit right to use its phone numbers. This protocol-level verification prevents high-volume dialer traffic from being falsely flagged as spoofed robocalls, keeping your agent connection rates high and your outreach unblocked. To learn more advanced features that you can use with outbound call centers, see Voice outbound contact center.
You can use this guide to proactively optimize your sales conversion rates by digitally signing every outbound call your representatives place. Implementing SHAKEN/STIR verifies your business's caller identity directly on the recipient's handset, giving prospects the confidence to answer your team's calls instead of dismissing them as unverified spam. To learn more advanced features that you can use with sales dialers, see Voice sales dialer.
You can use this guide to secure carrier-level authentication for your automated conversational assistants before the audio stream even begins. By utilizing SHAKEN/STIR token signing, you establish a chain of trust that differentiates your AI agents from malicious, spoofed robocallers, allowing your intelligent virtual assistants to successfully connect and interact with users in real-time. To learn more advanced features that you can use with AI agents, see Voice AI agents.
After following this guide, you can successfully onboard your direct customer subaccounts for SHAKEN/STIR via the Twilio Trust Hub REST API. Once your SHAKEN/STIR Trust Product is verified, your outbound calls will be signed with full attestation, ensuring high connection rates and validating your voice brand identity.
Explore the following guides to build on what you've learned in this guide:
- Branded Calling: Display your brand's logo and name on your customers' phones to increase answer rates and build trust.
- Voice Integrity Onboarding: Combine your verified identity with reputation monitoring tools to protect against spam tagging.