Skip to contentSkip to navigationSkip to topbar
On this page

Voice Integrity Onboarding with the Trust Hub REST API (ISVs/Resellers using Subaccounts)


(information)

Info

For general information on the Trust Hub API, go to the Trust Hub API Docs.

This page walks ISVs/Resellers using subaccounts through creating a Voice Integrity Trust Product with the Trust Hub REST API.

Not an ISV/Reseller using subaccounts? Find the appropriate onboarding instructions below:

ISVs/Resellers using Subaccounts

Voice Integrity - ISV with subaccounts: Create Primary Business Profile, Create Secondary Business Profile under Subaccount.

There are three main sections in this guide:

  • Create Primary Business Profile in the Console

  • Create Secondary Business Profile under Customer Subaccount, Add Phone Numbers

    • Create Secondary Business Profile, Connect to Primary Business Profile
    • Create a Supporting Document, Connect to Secondary Business Profile
    • Create Business Information, Connect to Secondary Business Profile
    • Create Authorized Representative, Connect to Secondary Business Profile
    • Add Phone Numbers to Secondary Business Profile
    • Submit Secondary Business Profile for Vetting
  • Create Trust Product, Add Phone Numbers, and Submit for Vetting


Create a Primary Business Profile in your Parent Account in the Console's Trust Hub and submit for vetting.

create-a-primary-business-profile-in-your-parent-account-in-the-consoles-trust-hub-and-submit-for-vetting page anchor

Create Secondary Business Profile for Customer Subaccount

create-secondary-business-profile-for-customer-subaccount page anchor

1. Create a Secondary Business Profile for your Customer's Subaccount

1-create-a-secondary-business-profile-for-your-customers-subaccount page anchor
  • You will want to save the sid from the response. This is your Secondary Business Profile SID, and you will need it for the next step.

  • Do not change the PolicySID in the API call below. This is a static value that will be the same across all accounts.

Create Secondary Business Profile under Customer SubaccountLink to code sample: Create Secondary Business Profile under Customer Subaccount
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 createCustomerProfile() {
11
const customerProfile = await client.trusthub.v1.customerProfiles.create({
12
email: "EMAIL@EMAIL.COM",
13
friendlyName: "YOUR_FRIENDLY_NAME_FOR_SECONDARY_CUSTOMER_PROFILE",
14
policySid: "RNdfbf3fae0e1107f8aded0e7cead80bf5",
15
});
16
17
console.log(customerProfile.sid);
18
}
19
20
createCustomerProfile();

Output

1
{
2
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"policy_sid": "RNdfbf3fae0e1107f8aded0e7cead80bf5",
5
"friendly_name": "YOUR_FRIENDLY_NAME_FOR_SECONDARY_CUSTOMER_PROFILE",
6
"status": "draft",
7
"email": "EMAIL@EMAIL.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": null
19
}

2. Connect the Secondary Business Profile to your Primary Business Profile

2-connect-the-secondary-business-profile-to-your-primary-business-profile page anchor
Connect the Secondary Business Profile to Primary Business ProfileLink to code sample: Connect the Secondary Business Profile to Primary Business Profile
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 createCustomerProfileEntityAssignment() {
11
const customerProfilesEntityAssignment = await client.trusthub.v1
12
.customerProfiles("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
13
.customerProfilesEntityAssignments.create({
14
objectSid: "YOUR_PRIMARY_BUSINESS_PROFILE_SID",
15
});
16
17
console.log(customerProfilesEntityAssignment.sid);
18
}
19
20
createCustomerProfileEntityAssignment();

Output

1
{
2
"sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"customer_profile_sid": "YOUR_SECONDARY_BUSINESS_PROFILE_SID",
4
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"object_sid": "YOUR_PRIMARY_BUSINESS_PROFILE_SID",
6
"date_created": "2019-07-31T02:34:41Z",
7
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
8
}

3. Create a Supporting Document

3-create-a-supporting-document page anchor
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 createSupportingDocument() {
11
const supportingDocument =
12
await client.trusthub.v1.supportingDocuments.create({
13
attributes: {
14
address_sids: "YOUR_CUSTOMER_ADDRESS_SID",
15
},
16
friendlyName: "YOUR_CUSTOMER_FRIENDLY_NAME",
17
type: "customer_profile_address",
18
});
19
20
console.log(supportingDocument.sid);
21
}
22
23
createSupportingDocument();

Output

1
{
2
"status": "draft",
3
"date_updated": "2021-02-11T17:23:00Z",
4
"friendly_name": "YOUR_CUSTOMER_FRIENDLY_NAME",
5
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"url": "https://trusthub.twilio.com/v1/SupportingDocuments/RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"date_created": "2021-02-11T17:23:00Z",
8
"sid": "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
"attributes": {
10
"address_sids": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
11
},
12
"type": "customer_profile_address",
13
"mime_type": null
14
}

4. Connect the Supporting Document to your Secondary Business Profile

4-connect-the-supporting-document-to-your-secondary-business-profile page anchor
  • You will need your Secondary Business Profile SID used earlier.

  • You will need the Supporting Document SID, which was returned in the previous step.

Connect the Supporting Document to your Secondary Business ProfileLink to code sample: Connect the Supporting Document to your Secondary Business Profile
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 createCustomerProfileEntityAssignment() {
11
const customerProfilesEntityAssignment = await client.trusthub.v1
12
.customerProfiles("YOUR_SECONDARY_CUSTOMER_PROFILE_SID")
13
.customerProfilesEntityAssignments.create({
14
objectSid: "YOUR_SUPPORTING_DOCUMENT_SID",
15
});
16
17
console.log(customerProfilesEntityAssignment.sid);
18
}
19
20
createCustomerProfileEntityAssignment();

Output

1
{
2
"sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"customer_profile_sid": "YOUR_SECONDARY_CUSTOMER_PROFILE_SID",
4
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"object_sid": "YOUR_SUPPORTING_DOCUMENT_SID",
6
"date_created": "2019-07-31T02:34:41Z",
7
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
8
}

5. Create Business Information for the Secondary Business Profile

5-create-business-information-for-the-secondary-business-profile page anchor

You will need the following information about your Secondary Business:

ParameterDefinition/Possible Values
business_name

required
Definition: Your Secondary Business' legal business name

Possible Values: [any string]
business_identity

required
Definition: Your Secondary Business' structure.

Possible Values:

direct_customer

isv_reseller_or_partner

unknown
business_type

required
Definition: Business type for your Secondary Business

Possible Values:

Sole Proprietorship

Partnership

Limited Liability Corporation

Corporation

Co-operative

Limited Liability Partnership

Non-profit
business_industry

required
Definition: Industry of Secondary Business

Possible Values:

AUTOMOTIVE

AGRICULTURE

BANKING

CONSUMER

EDUCATION

ENGINEERING

ENERGY

OIL_AND_GAS

FAST_MOVING_CONSUMER_GOODS

FINANCIAL

FINTECH

FOOD_AND_BEVERAGE

GOVERNMENT

HEALTHCARE

HOSPITALITY

INSURANCE

LEGAL

MANUFACTURING

MEDIA

ONLINE

RAW_MATERIALS

REAL_ESTATE

RELIGION

RETAIL

JEWELRY

TECHNOLOGY

TELECOMMUNICATIONS

TRANSPORTATION

TRAVEL

ELECTRONICS

NOT_FOR_PROFIT
business_registration_identifier

required
Definition: The official method used to register the Secondary Business' identity.

Possible Values:

USA: DUNS Number (Dun & Bradstreet)

USA: Employer Identification Number (EIN)
business_registration_number

required
Definition: The number used to identify your Secondary Business of the type chosen for your business_registration_identifier

Possible Values: [numerical string for USA types]
business_regions_of_operation

required
Definition: Regions your Secondary Business

AFRICA

ASIA

EUROPE

LATIN_AMERICA

USA_AND_CANADA
website_url

required
Definition: The URL for the Secondary Business' website

Possible Values: [any valid URL string]
social_media_profile_urls

optional
Definition: The URL(s) for the Secondary Business' social media accounts (i.e. LinkedIn, Facebook, Twitter)

Possible Values: [any valid URL string]

Do not change the Type value. It must be customer_profile_business_information in order to create the correct resource.

  • You'll need the Business Information SID returned from this API call for the next step.
(error)

Danger

Updates are coming to Twilio's Starter Brand registration based on changes from The Campaign Registry (TCR)(link takes you to an external page) and mobile carriers. We will provide updates on how this change may impact US A2P 10DLC registration as soon as they are available. Brands with EINs will no longer be able to use Twilio's Starter Brand registration going forward.

In the meantime, if you are registering on behalf of an organization with an EIN/Tax ID, please complete a Standard registration.

Create Business Information for the Secondary Business ProfileLink to code sample: Create Business Information for the Secondary Business Profile
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 createEndUser() {
11
const endUser = await client.trusthub.v1.endUsers.create({
12
attributes: {
13
business_name: "YOUR_SECONDARY_BUSINESS_NAME",
14
business_identity: "YOUR_SECONDARY_BUSINESS_IDENTITY",
15
business_type: "YOUR_SECONDARY_BUSINESS_TYPE",
16
business_industry: "YOUR_SECONDARY_BUSINESS_INDUSTRY",
17
business_registration_identifier: "YOUR_SECONDARY_BUSINESS_IDENTIFIER",
18
business_registration_number:
19
"YOUR_SECONDARY_BUSINESS_REGISTRATION_NUMBER",
20
business_regions_of_operation:
21
"YOUR_SECONDARY_BUSINESS_REGIONS_OF_OPERATION",
22
website_url: "YOUR_SECONDARY_BUSINESS_URL",
23
social_media_profile_urls: "",
24
},
25
friendlyName: "YOUR_CUSTOMER_FRIENDLY_NAME",
26
type: "customer_profile_business_information",
27
});
28
29
console.log(endUser.sid);
30
}
31
32
createEndUser();

Output

1
{
2
"date_updated": "2021-02-16T20:40:57Z",
3
"sid": "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"friendly_name": "YOUR_CUSTOMER_FRIENDLY_NAME",
5
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"url": "https://trusthub.twilio.com/v1/EndUsers/ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"date_created": "2021-02-16T20:40:57Z",
8
"attributes": {
9
"phone_number": "+11234567890",
10
"job_position": "CEO",
11
"first_name": "rep1",
12
"last_name": "test",
13
"business_title": "ceo",
14
"email": "foobar@test.com"
15
},
16
"type": "customer_profile_business_information"
17
}

6. Connect Business Information to Secondary Business Profile

6-connect-business-information-to-secondary-business-profile page anchor
  • You will need the Customer Profile Business Information SID, which was returned in the last step.

  • The Customer Profile Business Information SID will start with "IT".

  • To find your Customer Profile Business Information SID via API, see the Read all End Users call in the Additional API Calls section.

Connect Business Information to Secondary Business ProfileLink to code sample: Connect Business Information to Secondary Business Profile
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 createCustomerProfileEntityAssignment() {
11
const customerProfilesEntityAssignment = await client.trusthub.v1
12
.customerProfiles("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
13
.customerProfilesEntityAssignments.create({
14
objectSid: "YOUR_CUSTOMER_PROFILE_BUSINESS_INFORMATION_SID",
15
});
16
17
console.log(customerProfilesEntityAssignment.sid);
18
}
19
20
createCustomerProfileEntityAssignment();

Output

1
{
2
"sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"customer_profile_sid": "YOUR_SECONDARY_BUSINESS_PROFILE_SID",
4
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"object_sid": "YOUR_CUSTOMER_PROFILE_BUSINESS_INFORMATION_SID",
6
"date_created": "2019-07-31T02:34:41Z",
7
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
8
}

7. Create an Authorized Representative for your Secondary Business Profile

7-create-an-authorized-representative-for-your-secondary-business-profile page anchor
  • You must add one Authorized Representative as a contact for the Secondary Business.

  • A second Authorized Representative is optional.

    • To add a second representative repeat this step with the second Authorized Representative's information, but you will need to change the Type parameter to authorized_representative_2
  • Information you will need:

    • First Name

    • Last Name

    • Email

    • Phone Number

    • Business Title

    • Job Position

      • Possible Values: Director, GM, VP, CEO, CFO, General Counsel
  • This call will return the Authorized Representative's SID. You will need this for the next step.

Create an Authorized Representative for your Secondary Business ProfileLink to code sample: Create an Authorized Representative for your Secondary Business Profile
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 createEndUser() {
11
const endUser = await client.trusthub.v1.endUsers.create({
12
attributes: {
13
first_name: "REPRESENTATIVE_FIRST_NAME",
14
last_name: "REPRESENTATIVE_LAST_NAME",
15
email: "EMAIL@EMAIL.COM",
16
phone_number: "+1XXXXXXXXXX",
17
business_title: "BUSINESS_TITLE",
18
job_position: "JOB_POSITION",
19
},
20
friendlyName: "YOUR_SECONDARY_BUSINESS_FRIENDLY_NAME",
21
type: "authorized_representative_1",
22
});
23
24
console.log(endUser.sid);
25
}
26
27
createEndUser();

Output

1
{
2
"date_updated": "2021-02-16T20:40:57Z",
3
"sid": "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"friendly_name": "YOUR_SECONDARY_BUSINESS_FRIENDLY_NAME",
5
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"url": "https://trusthub.twilio.com/v1/EndUsers/ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"date_created": "2021-02-16T20:40:57Z",
8
"attributes": {
9
"phone_number": "+11234567890",
10
"job_position": "CEO",
11
"first_name": "rep1",
12
"last_name": "test",
13
"business_title": "ceo",
14
"email": "foobar@test.com"
15
},
16
"type": "authorized_representative_1"
17
}

8. Connect Authorized Representative to Secondary Business Profile

8-connect-authorized-representative-to-secondary-business-profile page anchor
  • You will need the Authorized Representative's SID, which was returned in the last API call.

  • To find the SID via API, see the Read all End Users call in the Additional API Calls section below.

  • If you added a second Authorized Representative, you will need to repeat this call with that Representative's SID.

Connect Authorized Representative to Secondary Business ProfileLink to code sample: Connect Authorized Representative to Secondary Business Profile
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 createCustomerProfileEntityAssignment() {
11
const customerProfilesEntityAssignment = await client.trusthub.v1
12
.customerProfiles("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
13
.customerProfilesEntityAssignments.create({
14
objectSid: "YOUR_AUTHORIZED_REPRESENTATIVE_SID",
15
});
16
17
console.log(customerProfilesEntityAssignment.sid);
18
}
19
20
createCustomerProfileEntityAssignment();

Output

1
{
2
"sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"customer_profile_sid": "YOUR_SECONDARY_BUSINESS_PROFILE_SID",
4
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"object_sid": "YOUR_AUTHORIZED_REPRESENTATIVE_SID",
6
"date_created": "2019-07-31T02:34:41Z",
7
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
8
}

9. Add Phone Number(s) to Secondary Business Profile

9-add-phone-numbers-to-secondary-business-profile page anchor
  • You will need your Secondary Business Profile SID.

  • You'll also need your Phone Number SID(s)

    • To find your Phone Number SIDs in the Console, go to your Dashboard for your Customer Subaccount. In the Project Info section, click on See all phone numbers, then click on a phone number to find the SID.

    • To find your Phone Number SIDs via API, see the Additional API Calls section below.

    • Phone Number SIDs begin with "PN".

    • In the API Call below, don't change the ChannelEndpointType. It needs to be phone-number to add a phone number to your Business Profile.

Add Phone Number(s) to Secondary Business ProfileLink to code sample: Add Phone Number(s) to Secondary Business Profile
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("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
13
.customerProfilesChannelEndpointAssignment.create({
14
channelEndpointSid: "YOUR_PHONE_NUMBER_SID",
15
channelEndpointType: "phone-number",
16
});
17
18
console.log(customerProfilesChannelEndpointAssignment.sid);
19
}
20
21
createCustomerProfileChannelEndpointAssignment();

Output

1
{
2
"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"customer_profile_sid": "YOUR_SECONDARY_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
}

10. Submit Secondary Business Profile

10-submit-secondary-business-profile page anchor
  • You will need your Secondary Business Profile SID.
  • Do not change the value of the Status parameter. pending-review is needed to properly submit your Secondary Business Profile
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 updateCustomerProfile() {
11
const customerProfile = await client.trusthub.v1
12
.customerProfiles("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
13
.update({ status: "pending-review" });
14
15
console.log(customerProfile.sid);
16
}
17
18
updateCustomerProfile();

Output

1
{
2
"sid": "YOUR_SECONDARY_BUSINESS_PROFILE_SID",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"friendly_name": "friendly_name",
6
"status": "pending-review",
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": null
19
}

Create Trust Product, Add Phone Numbers, and Submit for Vetting

create-trust-product-add-phone-numbers-and-submit-for-vetting page anchor

1. Create a Voice Integrity Trust Product

1-create-a-voice-integrity-trust-product page anchor
  • Note: Do not change the policy_sid from the example below. This is a static value that will stay the same across all accounts.
  • 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/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 createTrustProduct() {
11
const trustProduct = await client.trusthub.v1.trustProducts.create({
12
email: "EMAIL@EXAMPLE.COM",
13
friendlyName: "FRIENDLY_NAME_FOR_YOUR_TRUST_PRODUCT",
14
policySid: "RN5b3660f9598883b1df4e77f77acefba0",
15
});
16
17
console.log(trustProduct.sid);
18
}
19
20
createTrustProduct();

Output

1
{
2
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"policy_sid": "RN5b3660f9598883b1df4e77f77acefba0",
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": null
19
}

2. Create End User for the Voice Integrity Trust Product

2-create-end-user-for-the-voice-integrity-trust-product page anchor
  • Information you will need:

    • Use Case

      • Possible Values: Identify & Verification,Asset Management,Lead Generation,Intelligent Routing,Appointment Scheduling,Customer Support,Self-Service,Automated Support,Appointment Reminders,Employee Notifications,Delivery Notifications,Emergency Notifications,Contactless Delivery,Order Notifications,Service Alerts,Purchase Confirmation,Mass Alerts,Fraud Alerts,Contact Tracing,Lead Management,Lead Nurturing,Telemarketing,Marketing Events,Rewards Program,Lead Alerts,Lead Distribution,Abandoned Cart,Call Tracking,Outbound Dialer,Click to Call,Phone System,Meetings/Collaboration,Telehealth,Distance Learning,Shift Management,Field Notifications,Dating/Social,Remote appointments,Group Messaging,Exam Proctoring,Tutoring,Therapy (Individual+Group),Pharmacy,First Responder,Survey/Research
    • Business Employee count

      • The should be the number of employees in the business
    • Average Business Day Call Volume

      • This should be an estimate of number of calls per business day.
    • Notes

      • This may be any additional notes about the use case. For example "We do lost mile delivery of goods". This can be empty if there are no additional notes.
  • Note: Do not change the type from the example below.

  • The response will contain the SID for your End User. You'll need this for the next step.

Create an End User for the Voice Integrity Trust ProductLink to code sample: Create an End User for the Voice Integrity Trust Product
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 createEndUser() {
11
const endUser = await client.trusthub.v1.endUsers.create({
12
attributes: {
13
use_case: "Survey/Research",
14
business_employee_count: "10",
15
average_business_day_call_volume: "10",
16
notes: "Surveying people to learn about demographics",
17
},
18
friendlyName: "YOUR_END_USER_FRIENDLY_NAME",
19
type: "voice_integrity_information",
20
});
21
22
console.log(endUser.sid);
23
}
24
25
createEndUser();

Output

1
{
2
"date_updated": "2021-02-16T20:40:57Z",
3
"sid": "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"friendly_name": "YOUR_END_USER_FRIENDLY_NAME",
5
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"url": "https://trusthub.twilio.com/v1/EndUsers/ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"date_created": "2021-02-16T20:40:57Z",
8
"attributes": {
9
"phone_number": "+11234567890",
10
"job_position": "CEO",
11
"first_name": "rep1",
12
"last_name": "test",
13
"business_title": "ceo",
14
"email": "foobar@test.com"
15
},
16
"type": "voice_integrity_information"
17
}

3. Connect your Voice Integrity Trust Product to End User

3-connect-your-voice-integrity-trust-product-to-end-user page anchor
  • You'll need your Trust Product's SID. This was returned by the API call in step 1.
  • You'll need your End User SID. This is the SID that starts with "IT" was returned by previous API call.
  • 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.
Connect your Voice Integrity Trust Product to End UserLink to code sample: Connect your Voice Integrity Trust Product to End User
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 createTrustProductEntityAssignment() {
11
const trustProductsEntityAssignment = await client.trusthub.v1
12
.trustProducts("YOUR_TRUST_PRODUCT_SID")
13
.trustProductsEntityAssignments.create({ objectSid: "YOUR_END_USER_SID" });
14
15
console.log(trustProductsEntityAssignment.sid);
16
}
17
18
createTrustProductEntityAssignment();

Output

1
{
2
"sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"trust_product_sid": "YOUR_TRUST_PRODUCT_SID",
4
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"object_sid": "YOUR_END_USER_SID",
6
"date_created": "2019-07-31T02:34:41Z",
7
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
8
}

4. Connect your Voice Integrity Trust Product to your Secondary Business Profile

4-connect-your-voice-integrity-trust-product-to-your-secondary-business-profile page anchor
  • You'll need your Trust Product's SID. This was returned by the API call in step 1.
  • You'll need your Secondary 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.
Connect your Voice Integrity Trust Product to your Secondary Business ProfileLink to code sample: Connect your Voice Integrity Trust Product to your Secondary Business Profile
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 createTrustProductEntityAssignment() {
11
const trustProductsEntityAssignment = await client.trusthub.v1
12
.trustProducts("YOUR_TRUST_PRODUCT_SID")
13
.trustProductsEntityAssignments.create({
14
objectSid: "YOUR_SECONDARY_BUSINESS_PROFILE_SID",
15
});
16
17
console.log(trustProductsEntityAssignment.sid);
18
}
19
20
createTrustProductEntityAssignment();

Output

1
{
2
"sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"trust_product_sid": "YOUR_TRUST_PRODUCT_SID",
4
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"object_sid": "YOUR_SECONDARY_BUSINESS_PROFILE_SID",
6
"date_created": "2019-07-31T02:34:41Z",
7
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
8
}

5. Assign phone numbers to your Voice Integrity Trust Product

5-assign-phone-numbers-to-your-voice-integrity-trust-product page anchor
  • You'll need the Phone Number SID(s) you assigned to your Business Profile earlier. (Note: Only those phone numbers already assigned to your Secondary Business Profile are eligible)
  • You'll need your Trust Product SID.
  • Don't change the ChannelEndpointType
  • You can complete this step before or after submitting your Voice Integrity Trust Product
  • To check your Secondary Business Profile's phone numbers via API, see the Additional API Calls section below.
Assign Phone Numbers to Voice Integrity Trust ProductLink to code sample: Assign Phone Numbers to Voice Integrity Trust Product
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 createTrustProductChannelEndpointAssignment() {
11
const trustProductsChannelEndpointAssignment = await client.trusthub.v1
12
.trustProducts("YOUR_TRUST_PRODUCT_SID")
13
.trustProductsChannelEndpointAssignment.create({
14
channelEndpointSid: "YOUR_PHONE_NUMBER_SID",
15
channelEndpointType: "phone-number",
16
});
17
18
console.log(trustProductsChannelEndpointAssignment.sid);
19
}
20
21
createTrustProductChannelEndpointAssignment();

Output

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
}

6. Submit your Voice Integrity Trust Product

6-submit-your-voice-integrity-trust-product page anchor
  • Approval and registration of Phone Numbers may take 24 to 48 hours.
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 updateTrustProduct() {
11
const trustProduct = await client.trusthub.v1
12
.trustProducts("YOUR_TRUST_PRODUCT_SID")
13
.update({ status: "pending-review" });
14
15
console.log(trustProduct.sid);
16
}
17
18
updateTrustProduct();

Output

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": "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/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": null
19
}

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 listCustomerProfile() {
11
const customerProfiles = await client.trusthub.v1.customerProfiles.list({
12
limit: 20,
13
});
14
15
customerProfiles.forEach((c) => console.log(c.sid));
16
}
17
18
listCustomerProfile();

Output

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": "email",
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": 18601
23
}
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/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 createAddress() {
11
const address = await client.addresses.create({
12
city: "CUSTOMER_CITY",
13
customerName: "YOUR_CUSTOMER_NAME",
14
isoCountry: "BB",
15
postalCode: "CUSTOMER_POSTAL_CODE",
16
region: "CUSTOMER_STATE_OR_REGION",
17
street: "CUSTOMER_STREET",
18
});
19
20
console.log(address.accountSid);
21
}
22
23
createAddress();

Output

1
{
2
"account_sid": "YOUR_PARENT_ACCOUNT_OR_SUBACCOUNT_SID",
3
"city": "CUSTOMER_CITY",
4
"customer_name": "YOUR_CUSTOMER_NAME",
5
"date_created": "Tue, 18 Aug 2015 17:07:30 +0000",
6
"date_updated": "Tue, 18 Aug 2015 17:07:30 +0000",
7
"emergency_enabled": false,
8
"friendly_name": null,
9
"iso_country": "BB",
10
"postal_code": "CUSTOMER_POSTAL_CODE",
11
"region": "CUSTOMER_STATE_OR_REGION",
12
"sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
13
"street": "CUSTOMER_STREET",
14
"street_secondary": null,
15
"validated": false,
16
"verified": false,
17
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses/ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
18
}
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 listAddress() {
11
const addresses = await client.addresses.list({ limit: 20 });
12
13
addresses.forEach((a) => console.log(a.accountSid));
14
}
15
16
listAddress();

Output

1
{
2
"addresses": [
3
{
4
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"city": "SF",
6
"customer_name": "name",
7
"date_created": "Tue, 18 Aug 2015 17:07:30 +0000",
8
"date_updated": "Tue, 18 Aug 2015 17:07:30 +0000",
9
"emergency_enabled": false,
10
"friendly_name": null,
11
"iso_country": "US",
12
"postal_code": "94019",
13
"region": "CA",
14
"sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
15
"street": "4th",
16
"street_secondary": null,
17
"validated": false,
18
"verified": false,
19
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses/ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
20
}
21
],
22
"end": 0,
23
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses.json?PageSize=50&Page=0",
24
"last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses.json?PageSize=50&Page=0",
25
"next_page_uri": null,
26
"num_pages": 1,
27
"page": 0,
28
"page_size": 50,
29
"previous_page_uri": null,
30
"start": 0,
31
"total": 1,
32
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses.json?PageSize=50&Page=0"
33
}
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 listSupportingDocument() {
11
const supportingDocuments = await client.trusthub.v1.supportingDocuments.list(
12
{ limit: 20 }
13
);
14
15
supportingDocuments.forEach((s) => console.log(s.sid));
16
}
17
18
listSupportingDocument();

Output

1
{
2
"results": [
3
{
4
"status": "draft",
5
"date_updated": "2021-02-11T17:23:00Z",
6
"friendly_name": "Business-profile-physical-address",
7
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
"url": "https://trusthub.twilio.com/v1/SupportingDocuments/RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
"date_created": "2021-02-11T17:23:00Z",
10
"sid": "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
11
"attributes": {
12
"address_sids": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
13
},
14
"type": "customer_profile_address",
15
"mime_type": null
16
}
17
],
18
"meta": {
19
"page": 0,
20
"page_size": 50,
21
"first_page_url": "https://trusthub.twilio.com/v1/SupportingDocuments?PageSize=50&Page=0",
22
"previous_page_url": null,
23
"url": "https://trusthub.twilio.com/v1/SupportingDocuments?PageSize=50&Page=0",
24
"next_page_url": null,
25
"key": "results"
26
}
27
}
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 listEndUser() {
11
const endUsers = await client.trusthub.v1.endUsers.list({ limit: 20 });
12
13
endUsers.forEach((e) => console.log(e.sid));
14
}
15
16
listEndUser();

Output

1
{
2
"results": [
3
{
4
"date_updated": "2021-02-16T20:40:57Z",
5
"sid": "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"friendly_name": "auth_rep_1",
7
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
"url": "https://trusthub.twilio.com/v1/EndUsers/ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
"date_created": "2021-02-16T20:40:57Z",
10
"attributes": {
11
"phone_number": "+11234567890",
12
"job_position": "CEO",
13
"first_name": "rep1",
14
"last_name": "test",
15
"business_title": "ceo",
16
"email": "foobar@test.com"
17
},
18
"type": "authorized_representative_1"
19
}
20
],
21
"meta": {
22
"page": 0,
23
"page_size": 50,
24
"first_page_url": "https://trusthub.twilio.com/v1/EndUsers?PageSize=50&Page=0",
25
"previous_page_url": null,
26
"url": "https://trusthub.twilio.com/v1/EndUsers?PageSize=50&Page=0",
27
"next_page_url": null,
28
"key": "results"
29
}
30
}
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 listIncomingPhoneNumber() {
11
const incomingPhoneNumbers = await client.incomingPhoneNumbers.list({
12
limit: 20,
13
});
14
15
incomingPhoneNumbers.forEach((i) => console.log(i.accountSid));
16
}
17
18
listIncomingPhoneNumber();

Output

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": false
16
},
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
"subresource_uris": {
46
"assigned_add_ons": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns.json"
47
}
48
}
49
],
50
"next_page_uri": null,
51
"page": 0,
52
"page_size": 50,
53
"previous_page_uri": null,
54
"start": 0,
55
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0"
56
}
Check Secondary Business Profile Phone Number AssignmentsLink to code sample: Check Secondary Business Profile Phone Number Assignments
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("YOUR_SECONDARY_BUSINESS_PROFILE_SID")
13
.customerProfilesChannelEndpointAssignment.list({ limit: 20 });
14
15
customerProfilesChannelEndpointAssignments.forEach((c) =>
16
console.log(c.channelEndpointSid)
17
);
18
}
19
20
listCustomerProfileChannelEndpointAssignment();

Output

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
}

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.