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

SHAKEN/STIR Onboarding with the Trust Hub REST API (ISVs/Resellers with Single, Top-Level Project)


(information)

Info

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

This page walks ISVs/Resellers with one top-level project through creating a SHAKEN/STIR Trust Product with the Trust Hub REST API.

Not an ISV/Reseller with one top-level project? Find the appropriate onboarding instructions below:


Overview:

overview page anchor

There are three main sections in this guide:

  • Create Primary Business Profile in the Console
  • Create Secondary Business Profile, 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 under your Parent Account. Add Phone Numbers from Subaccounts to the Business Profile.

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

create-secondary-business-profile page anchor

1. Create a Secondary Business Profile for your customer

1-create-a-secondary-business-profile-for-your-customer 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 a Secondary Business Profile for your Customer

create-a-secondary-business-profile-for-your-customer page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = require('twilio')(accountSid, authToken);
_14
_14
client.trusthub.v1.customerProfiles
_14
.create({
_14
friendlyName: 'YOUR_FRIENDLY_NAME_FOR_SECONDARY_CUSTOMER_PROFILE',
_14
email: 'EMAIL@EMAIL.COM',
_14
policySid: 'RNdfbf3fae0e1107f8aded0e7cead80bf5'
_14
})
_14
.then(customer_profiles => console.log(customer_profiles.sid));

Output

_18
{
_18
"sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"policy_sid": "RNdfbf3fae0e1107f8aded0e7cead80bf5",
_18
"friendly_name": "YOUR_FRIENDLY_NAME_FOR_SECONDARY_CUSTOMER_PROFILE",
_18
"status": "draft",
_18
"email": "EMAIL@EMAIL.COM",
_18
"status_callback": "http://www.example.com",
_18
"valid_until": null,
_18
"date_created": "2019-07-30T22:29:24Z",
_18
"date_updated": "2019-07-31T01:09:00Z",
_18
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"links": {
_18
"customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/EntityAssignments",
_18
"customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Evaluations",
_18
"customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelEndpointAssignments"
_18
}
_18
}

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 your Primary Business Profile

connect-the-secondary-business-profile-to-your-primary-business-profile page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.trusthub.v1.customerProfiles('YOUR_SECONDARY_BUSINESS_PROFILE_SID')
_11
.customerProfilesEntityAssignments
_11
.create({objectSid: 'YOUR_PRIMARY_BUSINESS_PROFILE_SID'})
_11
.then(customer_profiles_entity_assignments => console.log(customer_profiles_entity_assignments.sid));

Output

_10
{
_10
"sid": "BVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"customer_profile_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"object_sid": "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"date_created": "2019-07-31T02:34:41Z",
_10
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/EntityAssignments/BVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_10
}

3. Create a Supporting Document

3-create-a-supporting-document page anchor

Create a Supporting Document

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

_16
// Download the helper library from https://www.twilio.com/docs/node/install
_16
// Find your Account SID and Auth Token at twilio.com/console
_16
// and set the environment variables. See http://twil.io/secure
_16
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_16
const authToken = process.env.TWILIO_AUTH_TOKEN;
_16
const client = require('twilio')(accountSid, authToken);
_16
_16
client.trusthub.v1.supportingDocuments
_16
.create({
_16
attributes: {
_16
address_sids: 'YOUR_CUSTOMER_ADDRESS_SID'
_16
},
_16
friendlyName: 'YOUR_CUSTOMER_FRIENDLY_NAME',
_16
type: 'customer_profile_address'
_16
})
_16
.then(supporting_document => console.log(supporting_document.sid));

Output

_14
{
_14
"status": "draft",
_14
"date_updated": "2021-02-11T17:23:00Z",
_14
"friendly_name": "YOUR_CUSTOMER_FRIENDLY_NAME",
_14
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"url": "https://trusthub.twilio.com/v1/SupportingDocuments/RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"date_created": "2021-02-11T17:23:00Z",
_14
"sid": "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14
"attributes": {
_14
"address_sids": "YOUR_CUSTOMER_ADDRESS_SID"
_14
},
_14
"type": "customer_profile_address",
_14
"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 Profile

connect-the-supporting-document-to-your-secondary-business-profile page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.trusthub.v1.customerProfiles('YOUR_SECONDARY_CUSTOMER_PROFILE_SID')
_11
.customerProfilesEntityAssignments
_11
.create({objectSid: 'YOUR_SUPPORTING_DOCUMENT_SID'})
_11
.then(customer_profiles_entity_assignments => console.log(customer_profiles_entity_assignments.sid));

Output

_10
{
_10
"sid": "BVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"customer_profile_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"object_sid": "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"date_created": "2019-07-31T02:34:41Z",
_10
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/EntityAssignments/BVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_10
}

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

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
Definiton: 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]
(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.

  • 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.

Create Business Information for Secondary Business Profile

create-business-information-for-secondary-business-profile page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_24
// Download the helper library from https://www.twilio.com/docs/node/install
_24
// Find your Account SID and Auth Token at twilio.com/console
_24
// and set the environment variables. See http://twil.io/secure
_24
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_24
const authToken = process.env.TWILIO_AUTH_TOKEN;
_24
const client = require('twilio')(accountSid, authToken);
_24
_24
client.trusthub.v1.endUsers
_24
.create({
_24
attributes: {
_24
business_name: 'YOUR_SECONDARY_BUSINESS_NAME',
_24
business_identity: 'YOUR_SECONDARY_BUSINESS_IDENTITY',
_24
business_type: 'YOUR_SECONDARY_BUSINESS_TYPE',
_24
business_industry: 'YOUR_SECONDARY_BUSINESS_INDUSTRY',
_24
business_registration_identifier: 'YOUR_SECONDARY_BUSINESS_IDENTIFIER',
_24
business_registration_number: 'YOUR_SECONDARY_BUSINESS_REGISTRATION_NUMBER',
_24
business_regions_of_operation: 'YOUR_SECONDARY_BUSINESS_REGIONS_OF_OPERATION',
_24
website_url: 'YOUR_SECONDARY_BUSINESS_URL',
_24
social_media_profile_urls: ''
_24
},
_24
friendlyName: 'YOUR_CUSTOMER_FRIENDLY_NAME',
_24
type: 'customer_profile_business_information'
_24
})
_24
.then(end_user => console.log(end_user.sid));

Output

_20
{
_20
"date_updated": "2021-02-16T20:40:57Z",
_20
"sid": "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_20
"friendly_name": "YOUR_CUSTOMER_FRIENDLY_NAME",
_20
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_20
"url": "https://trusthub.twilio.com/v1/EndUsers/ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_20
"date_created": "2021-02-16T20:40:57Z",
_20
"attributes": {
_20
"business_name": "YOUR_SECONDARY_BUSINESS_NAME",
_20
"business_identity": "YOUR_SECONDARY_BUSINESS_IDENTITY",
_20
"business_type": "YOUR_SECONDARY_BUSINESS_TYPE",
_20
"business_industry": "YOUR_SECONDARY_BUSINESS_INDUSTRY",
_20
"business_registration_identifier": "YOUR_SECONDARY_BUSINESS_IDENTIFIER",
_20
"business_registration_number": "YOUR_SECONDARY_BUSINESS_REGISTRATION_NUMBER",
_20
"business_regions_of_operation": "YOUR_SECONDARY_BUSINESS_REGIONS_OF_OPERATION",
_20
"website_url": "YOUR_SECONDARY_BUSINESS_URL",
_20
"social_media_profile_urls": ""
_20
},
_20
"type": "customer_profile_business_information"
_20
}

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 Profile

connect-business-information-to-secondary-business-profile page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.trusthub.v1.customerProfiles('YOUR_SECONDARY_BUSINESS_PROFILE_SID')
_11
.customerProfilesEntityAssignments
_11
.create({objectSid: 'YOUR_CUSTOMER_PROFILE_BUSINESS_INFORMATION_SID'})
_11
.then(customer_profiles_entity_assignments => console.log(customer_profiles_entity_assignments.sid));

Output

_10
{
_10
"sid": "BVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"customer_profile_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"object_sid": "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"date_created": "2019-07-31T02:34:41Z",
_10
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/EntityAssignments/BVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_10
}

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

create-an-authorized-representative 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
// 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 = require('twilio')(accountSid, authToken);
_21
_21
client.trusthub.v1.endUsers
_21
.create({
_21
attributes: {
_21
first_name: 'REPRESENTATIVE_FIRST_NAME',
_21
last_name: 'REPRESENTATIVE_LAST_NAME',
_21
email: 'EMAIL@EMAIL.COM',
_21
phone_number: '+1XXXXXXXXXX',
_21
business_title: 'BUSINESS_TITLE',
_21
job_position: 'JOB_POSITION'
_21
},
_21
friendlyName: 'YOUR_SECONDARY_BUSINESS_FRIENDLY_NAME',
_21
type: 'authorized_representative_1'
_21
})
_21
.then(end_user => console.log(end_user.sid));

Output

_17
{
_17
"date_updated": "2021-02-16T20:40:57Z",
_17
"sid": "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"friendly_name": "YOUR_SECONDARY_BUSINESS_FRIENDLY_NAME",
_17
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"url": "https://trusthub.twilio.com/v1/EndUsers/ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"date_created": "2021-02-16T20:40:57Z",
_17
"attributes": {
_17
"first_name": "REPRESENTATIVE_FIRST_NAME",
_17
"last_name": "REPRESENTATIVE_LAST_NAME",
_17
"email": "EMAIL@EMAIL.COM",
_17
"phone_number": "+1XXXXXXXXXX",
_17
"business_title": "BUSINESS_TITLE",
_17
"job_position": "JOB_POSITION"
_17
},
_17
"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 Profile

connect-authorized-representative-to-secondary-business-profile page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.trusthub.v1.customerProfiles('YOUR_SECONDARY_BUSINESS_PROFILE_SID')
_11
.customerProfilesEntityAssignments
_11
.create({objectSid: 'YOUR_AUTHORIZED_REPRESENTATIVE_SID'})
_11
.then(customer_profiles_entity_assignments => console.log(customer_profiles_entity_assignments.sid));

Output

_10
{
_10
"sid": "BVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"customer_profile_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"object_sid": "YOUR_AUTHORIZED_REPRESENTATIVE_SID",
_10
"date_created": "2019-07-31T02:34:41Z",
_10
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/EntityAssignments/BVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_10
}

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 . 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 to Secondary Business Profile

add-phone-number-to-secondary-business-profile page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = require('twilio')(accountSid, authToken);
_14
_14
client.trusthub.v1.customerProfiles('YOUR_SECONDARY_BUSINESS_PROFILE_SID')
_14
.customerProfilesChannelEndpointAssignment
_14
.create({
_14
channelEndpointType: 'phone-number',
_14
channelEndpointSid: 'YOUR_PHONE_NUMBER_SID'
_14
})
_14
.then(customer_profiles_channel_endpoint_assignment => console.log(customer_profiles_channel_endpoint_assignment.sid));

Output

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

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

Submit Secondary Business Profile

submit-secondary-business-profile page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.trusthub.v1.customerProfiles('YOUR_SECONDARY_BUSINESS_PROFILE_SID')
_10
.update({status: 'pending-review'})
_10
.then(customer_profiles => console.log(customer_profiles.friendlyName));

Output

_18
{
_18
"sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"policy_sid": "RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"friendly_name": "friendly_name",
_18
"status": "pending-review",
_18
"email": "email",
_18
"status_callback": "http://www.example.com",
_18
"valid_until": null,
_18
"date_created": "2019-07-30T22:29:24Z",
_18
"date_updated": "2019-07-31T01:09:00Z",
_18
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"links": {
_18
"customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/EntityAssignments",
_18
"customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Evaluations",
_18
"customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelEndpointAssignments"
_18
}
_18
}


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 SHAKEN/STIR Trust Product

1-create-a-shakenstir-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.

Create SHAKEN/STIR Trust Product

create-shakenstir-trust-product page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = require('twilio')(accountSid, authToken);
_14
_14
client.trusthub.v1.trustProducts
_14
.create({
_14
friendlyName: 'FRIENDLY_NAME_FOR_YOUR_TRUST_PRODUCT',
_14
email: 'EMAIL@EMAIL.COM',
_14
policySid: 'RN7a97559effdf62d00f4298208492a5ea'
_14
})
_14
.then(trust_products => console.log(trust_products.sid));

Output

_18
{
_18
"sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"policy_sid": "RN7a97559effdf62d00f4298208492a5ea",
_18
"friendly_name": "FRIENDLY_NAME_FOR_YOUR_TRUST_PRODUCT",
_18
"status": "draft",
_18
"email": "EMAIL@EMAIL.COM",
_18
"status_callback": "http://www.example.com",
_18
"valid_until": null,
_18
"date_created": "2019-07-30T22:29:24Z",
_18
"date_updated": "2019-07-31T01:09:00Z",
_18
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"links": {
_18
"trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/EntityAssignments",
_18
"trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Evaluations",
_18
"trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelEndpointAssignments"
_18
}
_18
}

2. Connect your SHAKEN/STIR Trust Product to your Secondary Business Profile

2-connect-your-shakenstir-trust-product-to-your-secondary-business-profile page anchor
  • You'll need your Trust Product's SID . This was returned by the previous API call.
  • 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 SHAKEN/STIR Trust Product to your Secondary Business Profile

connect-your-shakenstir-trust-product-to-your-secondary-business-profile page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.trusthub.v1.trustProducts('YOUR_TRUST_PRODUCT_SID')
_11
.trustProductsEntityAssignments
_11
.create({objectSid: 'YOUR_SECONDARY_BUSINESS_PROFILE_SID'})
_11
.then(trust_products_entity_assignments => console.log(trust_products_entity_assignments.sid));

Output

_10
{
_10
"sid": "BVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"trust_product_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"object_sid": "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"date_created": "2019-07-31T02:34:41Z",
_10
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/EntityAssignments/BVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_10
}

3. Assign phone numbers to your SHAKEN/STIR Trust Product

3-assign-phone-numbers-to-your-shakenstir-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 that was 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 Secondary Business Profile's phone numbers via API, see the Additional API Calls section below.

Assign Phone Numbers to SHAKEN/STIR Trust Product

assign-phone-numbers-to-shakenstir-trust-product page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = require('twilio')(accountSid, authToken);
_14
_14
client.trusthub.v1.trustProducts('YOUR_TRUST_PRODUCT_SID')
_14
.trustProductsChannelEndpointAssignment
_14
.create({
_14
channelEndpointType: 'phone-number',
_14
channelEndpointSid: 'YOUR_PHONE_NUMBER_SID'
_14
})
_14
.then(trust_products_channel_endpoint_assignment => console.log(trust_products_channel_endpoint_assignment.sid));

Output

_10
{
_10
"sid": "RAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"trust_product_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"channel_endpoint_sid": "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"channel_endpoint_type": "phone-number",
_10
"date_created": "2019-07-31T02:34:41Z",
_10
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelEndpointAssignments/RAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_10
}

4. Submit your SHAKEN/STIR Trust Product for vetting

4-submit-your-shakenstir-trust-product-for-vetting page anchor
  • Once it reaches Twilio-Approved status, you will be able to sign outbound calls with "A" level attestation.

Submit SHAKEN/STIR Trust Product for Vetting

submit-shakenstir-trust-product-for-vetting page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.trusthub.v1.trustProducts('YOUR_TRUST_PRODUCT_SID')
_10
.update({status: 'pending-review'})
_10
.then(trust_products => console.log(trust_products.friendlyName));

Output

_18
{
_18
"sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"policy_sid": "RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"friendly_name": "friendly_name",
_18
"status": "pending-review",
_18
"email": "email",
_18
"status_callback": "http://www.example.com",
_18
"valid_until": null,
_18
"date_created": "2019-07-30T22:29:24Z",
_18
"date_updated": "2019-07-31T01:09:00Z",
_18
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"links": {
_18
"trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/EntityAssignments",
_18
"trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Evaluations",
_18
"trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelEndpointAssignments"
_18
}
_18
}


Get Business Profile SIDs

get-business-profile-sids page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.trusthub.v1.customerProfiles
_10
.list({limit: 20})
_10
.then(customerProfiles => customerProfiles.forEach(c => console.log(c.sid)));

Output

_31
{
_31
"results": [
_31
{
_31
"sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_31
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_31
"policy_sid": "RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_31
"friendly_name": "friendly_name",
_31
"status": "twilio-approved",
_31
"email": "email",
_31
"status_callback": "http://www.example.com",
_31
"valid_until": "2020-07-31T01:00:00Z",
_31
"date_created": "2019-07-30T22:29:24Z",
_31
"date_updated": "2019-07-31T01:09:00Z",
_31
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_31
"links": {
_31
"customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/EntityAssignments",
_31
"customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Evaluations",
_31
"customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelEndpointAssignments"
_31
}
_31
}
_31
],
_31
"meta": {
_31
"page": 0,
_31
"page_size": 50,
_31
"first_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles?Status=draft&FriendlyName=friendly_name&PolicySid=RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&PageSize=50&Page=0",
_31
"previous_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles?Status=draft&FriendlyName=friendly_name&PolicySid=RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&PageSize=50&Page=0",
_31
"url": "https://trusthub.twilio.com/v1/CustomerProfiles?Status=draft&FriendlyName=friendly_name&PolicySid=RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&PageSize=50&Page=0",
_31
"next_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles?Status=draft&FriendlyName=friendly_name&PolicySid=RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&PageSize=50&Page=1",
_31
"key": "results"
_31
}
_31
}

Create an Address Resource

create-an-address-resource page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_17
// Download the helper library from https://www.twilio.com/docs/node/install
_17
// Find your Account SID and Auth Token at twilio.com/console
_17
// and set the environment variables. See http://twil.io/secure
_17
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_17
const authToken = process.env.TWILIO_AUTH_TOKEN;
_17
const client = require('twilio')(accountSid, authToken);
_17
_17
client.addresses
_17
.create({
_17
customerName: 'YOUR_CUSTOMER_NAME',
_17
street: 'CUSTOMER_STREET',
_17
city: 'CUSTOMER_CITY',
_17
region: 'CUSTOMER_STATE_OR_REGION',
_17
postalCode: 'CUSTOMER_POSTAL_CODE',
_17
isoCountry: 'CUSTOMER_COUNTRY_CODE'
_17
})
_17
.then(address => console.log(address.sid));

Output

_18
{
_18
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"city": "CUSTOMER_CITY",
_18
"customer_name": "YOUR_CUSTOMER_NAME",
_18
"date_created": "Tue, 18 Aug 2015 17:07:30 +0000",
_18
"date_updated": "Tue, 18 Aug 2015 17:07:30 +0000",
_18
"emergency_enabled": false,
_18
"friendly_name": null,
_18
"iso_country": "CUSTOMER_COUNTRY_CODE",
_18
"postal_code": "CUSTOMER_POSTAL_CODE",
_18
"region": "CUSTOMER_STATE_OR_REGION",
_18
"sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"street": "CUSTOMER_STREET",
_18
"street_secondary": null,
_18
"validated": false,
_18
"verified": false,
_18
"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json"
_18
}

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.addresses.list({limit: 20})
_10
.then(addresses => addresses.forEach(a => console.log(a.sid)));

Output

_33
{
_33
"addresses": [
_33
{
_33
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_33
"city": "SF",
_33
"customer_name": "name",
_33
"date_created": "Tue, 18 Aug 2015 17:07:30 +0000",
_33
"date_updated": "Tue, 18 Aug 2015 17:07:30 +0000",
_33
"emergency_enabled": false,
_33
"friendly_name": null,
_33
"iso_country": "US",
_33
"postal_code": "94019",
_33
"region": "CA",
_33
"sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_33
"street": "4th",
_33
"street_secondary": null,
_33
"validated": false,
_33
"verified": false,
_33
"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json"
_33
}
_33
],
_33
"end": 0,
_33
"first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json?PageSize=50&Page=0",
_33
"last_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json?PageSize=50&Page=0",
_33
"next_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json?PageSize=50&Page=50",
_33
"num_pages": 1,
_33
"page": 0,
_33
"page_size": 50,
_33
"previous_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json?PageSize=50&Page=0",
_33
"start": 0,
_33
"total": 1,
_33
"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json?PageSize=50&Page=0"
_33
}

Retrieve Supporting Document SIDs

retrieve-supporting-document-sids page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.trusthub.v1.supportingDocuments
_10
.list({limit: 20})
_10
.then(supportingDocuments => supportingDocuments.forEach(s => console.log(s.sid)));

Output

_27
{
_27
"results": [
_27
{
_27
"status": "draft",
_27
"date_updated": "2021-02-11T17:23:00Z",
_27
"friendly_name": "Business-profile-physical-address",
_27
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"url": "https://trusthub.twilio.com/v1/SupportingDocuments/RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"date_created": "2021-02-11T17:23:00Z",
_27
"sid": "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27
"attributes": {
_27
"address_sids": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_27
},
_27
"type": "customer_profile_address",
_27
"mime_type": null
_27
}
_27
],
_27
"meta": {
_27
"page": 0,
_27
"page_size": 50,
_27
"first_page_url": "https://trusthub.twilio.com/v1/SupportingDocuments?PageSize=50&Page=0",
_27
"previous_page_url": "https://trusthub.twilio.com/v1/SupportingDocuments?PageSize=50&Page=0",
_27
"url": "https://trusthub.twilio.com/v1/SupportingDocuments?PageSize=50&Page=0",
_27
"next_page_url": "https://trusthub.twilio.com/v1/SupportingDocuments?PageSize=50&Page=1",
_27
"key": "results"
_27
}
_27
}

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.trusthub.v1.endUsers
_10
.list({limit: 20})
_10
.then(endUsers => endUsers.forEach(e => console.log(e.sid)));

Output

_30
{
_30
"results": [
_30
{
_30
"date_updated": "2021-02-16T20:40:57Z",
_30
"sid": "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_30
"friendly_name": "auth_rep_1",
_30
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_30
"url": "https://trusthub.twilio.com/v1/EndUsers/ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_30
"date_created": "2021-02-16T20:40:57Z",
_30
"attributes": {
_30
"phone_number": "+11234567890",
_30
"job_position": "CEO",
_30
"first_name": "rep1",
_30
"last_name": "test",
_30
"business_title": "ceo",
_30
"email": "foobar@test.com"
_30
},
_30
"type": "authorized_representative_1"
_30
}
_30
],
_30
"meta": {
_30
"page": 0,
_30
"page_size": 50,
_30
"first_page_url": "https://trusthub.twilio.com/v1/EndUsers?PageSize=50&Page=0",
_30
"previous_page_url": "https://trusthub.twilio.com/v1/EndUsers?PageSize=50&Page=0",
_30
"url": "https://trusthub.twilio.com/v1/EndUsers?PageSize=50&Page=0",
_30
"next_page_url": "https://trusthub.twilio.com/v1/EndUsers?PageSize=50&Page=1",
_30
"key": "results"
_30
}
_30
}

Get Phone Number SIDs from Parent Account

get-phone-number-sids-from-parent-account page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.incomingPhoneNumbers
_10
.list({limit: 20})
_10
.then(incomingPhoneNumbers => incomingPhoneNumbers.forEach(i => console.log(i.sid)));

Output

_56
{
_56
"end": 0,
_56
"first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0",
_56
"incoming_phone_numbers": [
_56
{
_56
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_56
"address_requirements": "none",
_56
"address_sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_56
"api_version": "2010-04-01",
_56
"beta": null,
_56
"capabilities": {
_56
"voice": true,
_56
"sms": false,
_56
"mms": true,
_56
"fax": false
_56
},
_56
"date_created": "Thu, 30 Jul 2015 23:19:04 +0000",
_56
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
_56
"emergency_status": "Active",
_56
"emergency_address_sid": "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_56
"emergency_address_status": "registered",
_56
"friendly_name": "(808) 925-5327",
_56
"identity_sid": "RIXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_56
"origin": "origin",
_56
"phone_number": "+18089255327",
_56
"sid": "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_56
"sms_application_sid": "",
_56
"sms_fallback_method": "POST",
_56
"sms_fallback_url": "",
_56
"sms_method": "POST",
_56
"sms_url": "",
_56
"status_callback": "",
_56
"status_callback_method": "POST",
_56
"trunk_sid": null,
_56
"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers/PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json",
_56
"voice_application_sid": "",
_56
"voice_caller_id_lookup": false,
_56
"voice_fallback_method": "POST",
_56
"voice_fallback_url": null,
_56
"voice_method": "POST",
_56
"voice_url": null,
_56
"bundle_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_56
"voice_receive_mode": "voice",
_56
"status": "in-use",
_56
"subresource_uris": {
_56
"assigned_add_ons": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers/PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AssignedAddOns.json"
_56
}
_56
}
_56
],
_56
"next_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=50",
_56
"page": 0,
_56
"page_size": 50,
_56
"previous_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0",
_56
"start": 0,
_56
"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0"
_56
}

Check Secondary Business Profile Phone Number Assignments

check-secondary-business-profile-phone-number-assignments page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.trusthub.v1.customerProfiles('YOUR_SECONDARY_BUSINESS_PROFILE_SID')
_11
.customerProfilesChannelEndpointAssignment
_11
.list({limit: 20})
_11
.then(customerProfilesChannelEndpointAssignment => customerProfilesChannelEndpointAssignment.forEach(c => console.log(c.sid)));

Output

_22
{
_22
"results": [
_22
{
_22
"sid": "RAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"customer_profile_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"channel_endpoint_sid": "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"channel_endpoint_type": "phone-number",
_22
"date_created": "2019-07-31T02:34:41Z",
_22
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelEndpointAssignments/RAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_22
}
_22
],
_22
"meta": {
_22
"page": 0,
_22
"page_size": 50,
_22
"first_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelEndpointAssignments?ChannelEndpointSid=PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&PageSize=50&Page=0",
_22
"previous_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelEndpointAssignments?ChannelEndpointSid=PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&PageSize=50&Page=0",
_22
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelEndpointAssignments?ChannelEndpointSid=PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&PageSize=50&Page=0",
_22
"next_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelEndpointAssignments?ChannelEndpointSid=PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&PageSize=50&Page=1",
_22
"key": "results"
_22
}
_22
}


Rate this page: