Menu

Trusthub REST API

TrustHub API organizes the Know Your Customer (KYC) information into structurally similar containers caller Customer Profiles and Trust Products.

A Policy will define the structure of these containers. Different Policies need Entity Assignments which can include End-User Types, Supporting Document Types, Supporting Customer Profiles, and Supporting Trust Products. Depending on the Policy of a given Customer Profile or Trust Product, we will build these resources by creating Entity Assignments for End-User, Supporting Documents, Supporting Customer Profiles and Supporting Trust Products.

End-User and Supporting Documents are created first as basic building blocks according to the structure defined by End-User Types and Supporting Document Types respectively.

A Customer profile is used to establish the identity of the user using any channel endpoint ( eg. phone number, email) on the Twilio platform.

A Trust Product is used to enable added features like SHAKEN/STIR, A2P and CNAM on a channel endpoint like a phone number.

Resources

Customer Profile Resource

The Twilio TrustHub REST API allows you to create empty Customer Profiles. The Customer Profiles will have Entity Assignments for End-User, Supporting Documents, and Supporting Customer Profiles.

Depending on the Policy of a given Customer Profile or Trust Product, we will build these resources by creating Entity Assignments for End-User, Supporting Documents, and Supporting Customer Profiles and Supporting Trust Products.

Trust Product Resource

The Twilio TrustHub REST API allows you to create empty Trust Products. The Trust Products will have Entity Assignments for End-User, Supporting Documents, Supporting Customer Profiles, and Supporting Trust Products.

Depending on the Policy of a given Customer Profile or Trust Product, we will build these resources by creating Entity Assignments for End-User, Supporting Documents, and Supporting Customer Profiles and Supporting Trust Products.

End-Users Resource

The Twilio TrustHub End-User REST API allows you to create End-Users to follow Policies. The End-User is a representation of an Individual or Business using the Twilio platform to communicate to their customers. For more details, see the End-User Type resource.

End-Users Type Resource

The Twilio TrustHub End-User Type resource of Twilio's TrustHub API informs you which type of end-user you can create and what the required values are. Once you know which end-user type you want to create and the required values, you will create an End-User using the End-User resource. Each End-User Type has a different set of values required to be compliant.

Supporting Documents Resource

The Supporting Documents resource of Twilio's Trusthub API allows you to create new Supporting Documents with metadata to fulfill Policies. Each Supporting Document Type may need different information to be compliant, so be sure to pass all of the correct values when creating a new Supporting Document for a Supporting Document Type .

Supporting Document Types Resource

The Supporting Document Type resource of Twilio's TrustHub API informs you which type of document you create and what the values are. You will then create a new Supporting Document with the correct type and values. Each Supporting Document Type may need different information to be compliant.

Customer Profile Entity Assignments Resource

The Twilio Customer Profile Entity Assignments REST API allows you to assign End-Users, Supporting Documents, and Supporting Customer profiles to Customer profiles.

Trust Product Entity Assignments Resource

The Twilio Trust Product Entity Assignments REST API allows you to assign End-Users, Supporting Documents , Supporting Customer profiles, and Supporting Trust Products to Trust Products.

Supporting Customer Profile

A Supporting Customer Profile is a customer profile that complies with the defined customer profile type for a policy.

Example

Policy Secondary-Customer-Profile's policy can define a supporting customer profile of type Primary-Customer-Profile.

This means that a Customer profile complying with Secondary-Customer-Profile Policy should contain an entity assignment of another Customer Profile which complies with the policy named Primary-Customer-Profile.

Supporting Trust Products

A supporting Trust Product is a Trust Product that complies with a defined policy for a supporting Trust Product.

Example

Policy Call-Integrity Trust product policy can define a supporting Trust Product of type CNAM.

This means that a Trust product complying with Call-Integrity Policy should contain an entity assignment of another Trust Product which complies with the policy named CNAM.

Policies Resource

The Twilio TrustHub REST API allows you to view and understand Policies. Policies define the required End-Users, Supporting Documents , Supporting Customer Profiles, and Supporting Trust Products for creating a Customer Profile or a Trust Product. A Policy dictates the Entity Assignments composition of a Customer Profile or a Trust Products.

Policies can and do change. Please make sure not to hardcode any Policy within your application. The policy resource is for you to call and populate the values required for Policy compliance.

Evaluations

The Evaluations Resource allows developers to understand what failed and why when a Customer Profile or Trust Product is submitted to be evaluated against a Policy. The synchronous request will provide error codes and instant feedback to fix the given Customer Profile or Trust Product.

Customer Profile Channel Endpoint Assignments

A Customer Profile Channel Endpoint Assignment is a mapping between a customer profile and a channel endpoint. This resource currently supports the phone-number channel endpoint type.

Trust Product Channel Endpoint Assignments

A Trust Product Channel Endpoint Assignment is a mapping between a customer profile and a channel endpoint. This resource currently supports the phone-number channel endpoint type. Trust Product channel endpoint assignments are required to enable various Trust products' required features on a channel endpoint.

In general, Trust products will require entity assignments of a Supporting Customer profile. A channel endpoint like a phone-number should be assigned to this required Customer-Profile-Channel-Endpoint-Assignment before assigning to Trust-Product-Channel-Endpoint-Assignment.

The idea is to always map a channel endpoint to a single identity represented by a unique Customer Profile.

Learn by Example

Let's learn to use the API with creating a Customer profile as an example:

Read a policy

Get the friendly name for a policy: "Secondary Customer Profile of type Business" using the read endpoint under Policies resource.

A policy describes the structure of Customer Profile that we are going to create.

Policy JSON object contains following elements:

requirements.end_user : this is a list of end_user_types which are required for the customer profile.

requirements.supporting_documents : this is a list of supporting_document_types which are required for customer profile.

requirements.supporting_customer_profile : this is a list of customer profiles types which are required for creating current customer profile.

Create an empty customer profile

Use the Policy SID of "Secondary Customer Profile of type Business" from previous section to create an empty customer profile using the create endpoint of the Customer profiles resource. Refer to "Create Customer Profiles" to do so.

Create required EndUser objects

  • Use EndUserType resource to understand the structure of EndUser that you are required to create.
  • Use EndUser resource to create the EndUser object.

Create required SupportingDocument objects

Create or retrieve required supporting CustomerProfile

  • The name of Policy, with which a Customer profile is created, is the customer profile type.
  • Get the required supporting customer profile type name from the above read policy section.
  • Get the policy sid of supporting customer profile type ( which is a policy name ) using the Policies API.
  • Create or retrieve supporting customer profile using API of Customer profiles resource.

Create EntityAssignments on customer profile

After all required building blocks of customer profile are created, use Customer Profile's EntityAssignment resource to create required entity assignments.

Submit the Bundle for review

Once a Customer profile is created with required entity assignments, it has to be submitted for review by Twilio.

Refer to "Update Customer Profiles" to update the CustomerProfiles's status to PENDING_REVIEW under Customer profiles resource.

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Community Forums or browsing the Twilio tag on Stack Overflow.

Thank you for your feedback!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Sending your feedback...
🎉 Thank you for your feedback!
Something went wrong. Please try again.

Thanks for your feedback!

Refer us and get $10 in 3 simple steps!

Step 1

Get link

Get a free personal referral link here

Step 2

Give $10

Your user signs up and upgrade using link

Step 3

Get $10

1,250 free SMSes
OR 1,000 free voice mins
OR 12,000 chats
OR more