Skip to contentSkip to navigationSkip to topbar
On this page

A2P 10DLC - Standard and Low-Volume Standard Brand Onboarding Guide for ISVs


This is a step-by-step walkthrough for Independent Software Vendors (ISVs) who wish to use Twilio's REST API to register a customer for a Standard Brand or Low-Volume Brand for A2P 10DLC.

Not sure if you're an ISV? Check out the Determine your customer type section on the A2P 10DLC Overview Page.

The onboarding process involves the following main steps:

  • Provide Twilio with your customer's business and contact information.
  • Create a Brand Registration for your customer that will be evaluated by The Campaign Registry (TCR).
  • Create a Campaign/Use Case for your customer that will be evaluated by TCR.

Before you begin

before-you-begin page anchor

This section covers the prerequisite steps you need to complete before attempting to register your customer for A2P 10DLC via API.

Gather customer information

gather-customer-information page anchor

Twilio and TCR need specific information about your customer's business in order to register for A2P 10DLC.

Visit the A2P 10DLC - Gather Business Information page to learn which information you need to collect from your customers.

Update your Helper Library

update-your-helper-library page anchor

If you plan to use one of the Helper Libraries for this registration process, be sure you're using the latest version.

Create a Primary Business Profile for your parent Twilio Account

create-a-primary-business-profile-for-your-parent-twilio-account page anchor

Before onboarding your customers, you must have a Primary Business Profile with a Twilio Approved status.

Create your Primary Business Profile in the Trust Hub in the Console(link takes you to an external page). Select ISV Reseller or Partner as your Business Type.

Make note of your Primary Business Profile SID. You need it in later steps in this guide.

Use the correct Account SID

use-the-correct-account-sid page anchor

When making the API requests in this guide, use the Twilio Account SID and Auth Token for the Account your customer will use for A2P 10DLC messaging.


Provide Twilio with your customer's business information

provide-twilio-with-your-customers-business-information page anchor

The API requests in this section use the TrustHub API to create a Secondary Customer Profile. This is a collection of contact details and business information about your customer's business, similar to the Primary Business Profile you created earlier.

In Step 1.1 below, you create a CustomerProfile resource (this is the "Secondary Customer Profile").

In Steps 1.2-1.7 below, you create additional resources that contain business information, and then you attach these resources to the CustomeProfile resource.

After attaching all required information to the CustomerProfile, you can check and submit the Secondary Customer Profile for review (Steps 1.9 and 1.10, respectively).

1.1. Create a Secondary Customer Profile

11-create-a-secondary-customer-profile page anchor

This step creates a CustomerProfile resource for your customer's business.

(information)

Info

If you've already registered customers within TrustHub for SHAKEN/STIR, Branded Calls, or CNAM, your customer may already have a Secondary Customer Profile.

You can check for Secondary Customer Profiles in the Console (Account > Customer Profiles). You can use the TrustHub REST API list all CustomerProfile resources associated with your Account.

  • Save the sid in the response to this request. This is the SID of the Secondary Customer Profile that you need in subsequent steps.
  • Do not change the policy_sid in the API request below. This is the Policy (rule set) that defines which information is required for a CustomerProfile.
  • The friendly_name is an internal identifier for this Customer Profile. Use a descriptive name that you understand, e.g., "Acme, Inc. Secondary Customer Profile".
  • The email parameter is the email address that will receive updates when the CustomerProfile resource's status changes. This should not be your customer's email address. This is an email address that you (as the ISV) own, since you need to monitor this CustomerProfile resource's status as part of the onboarding process.
  • The status_callback parameter is optional. This is the URL to which Twilio sends updates regarding this CustomerProfile's status .
Create a Secondary Customer ProfileLink to code sample: Create a Secondary Customer 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 createCustomerProfile() {
11
const customerProfile = await client.trusthub.v1.customerProfiles.create({
12
email: "acme-inc@example.com",
13
friendlyName: "Acme, Inc. Secondary Customer Profile",
14
policySid: "RNdfbf3fae0e1107f8aded0e7cead80bf5",
15
statusCallback: "https://www.example.com/status-callback-endpoint",
16
});
17
18
console.log(customerProfile.sid);
19
}
20
21
createCustomerProfile();

Output

1
{
2
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"policy_sid": "RNdfbf3fae0e1107f8aded0e7cead80bf5",
5
"friendly_name": "Acme, Inc. Secondary Customer Profile",
6
"status": "draft",
7
"email": "acme-inc@example.com",
8
"status_callback": "https://www.example.com/status-callback-endpoint",
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
}

1.2. Create an EndUser resource of type customer_profile_business_information

12-create-an-enduser-resource-of-type-customer_profile_business_information page anchor

This step creates an EndUser resource containing your customer's business information.

  • The type parameter must be "customer_profile_business_information" .
  • The friendly_name is an internal name for this API resource. Use a descriptive name, e.g., "Acme, Inc. Business Information EndUser resource".
  • All of the specific business information is passed in within the attributes parameter, as an object.
    • The attributes object contains the following parameters and the corresponding values that you collected from your customer earlier:
      • business_identity
      • business_industry
      • business_name
      • business_regions_of_operation
      • business_registration_identifier
      • business_registration_number
      • business_type
      • social_media_profile_urls (optional)
      • website_url
  • Save the sid in the response of this API request, which starts with "IT". You need it in the next step.
Create EndUser of type customer_profile_business_informationLink to code sample: Create EndUser of type customer_profile_business_information
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: "Acme, Inc.",
14
social_media_profile_urls:
15
"https://example.com/acme-social-media-profile",
16
website_url: "https://www.example.com",
17
business_regions_of_operation: "USA_AND_CANADA",
18
business_type: "Partnership",
19
business_registration_identifier: "EIN",
20
business_identity: "direct_customer",
21
business_industry: "EDUCATION",
22
business_registration_number: "123456789",
23
},
24
friendlyName: "Acme, Inc. - Business Information EndUser resource",
25
type: "customer_profile_business_information",
26
});
27
28
console.log(endUser.sid);
29
}
30
31
createEndUser();

Output

1
{
2
"date_updated": "2021-02-16T20:40:57Z",
3
"sid": "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"friendly_name": "Acme, Inc. - Business Information EndUser resource",
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
}

1.3. Attach the EndUser to the Secondary Customer Profile

13-attach-the-enduser-to-the-secondary-customer-profile page anchor

This step associates the EndUser resource with the Secondary Customer Profile from Step 1.1.

  • The sid in the path of this request is the SID of the CustomerProfile resource from Step 1.1.
  • The object_sid is the EndUser resource SID from Step 1.2.
Attach the EndUser resource to the Secondary Customer ProfileLink to code sample: Attach the EndUser resource to the Secondary Customer 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("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.customerProfilesEntityAssignments.create({
14
objectSid: "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
15
});
16
17
console.log(customerProfilesEntityAssignment.sid);
18
}
19
20
createCustomerProfileEntityAssignment();

Output

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

1.4. Create an EndUser resource of type: authorized_representative_1

14-create-an-enduser-resource-of-type-authorized_representative_1 page anchor

This step provides required information about an authorized representative for your customer's business.

  • The type parameter has a value of "authorized_representative_1" .
  • The friendly_name is an internal name for identifying this EndUser resource. Use a descriptive name, e.g., "Acme, Inc. Authorized Rep 1".
  • The authorized representative's contact information is provided via the attributes parameter. The attributes object contains the following parameters and the corresponding values that you collected from your customer earlier:
    • business_title
    • email
    • first_name
    • job_position
    • last_name
    • phone_number
Create EndUser of type authorized_representative_1Link to code sample: Create EndUser of type authorized_representative_1
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
job_position: "CEO",
14
last_name: "Doe",
15
phone_number: "+12225557890",
16
first_name: "Jane",
17
email: "jdoe@example.com",
18
business_title: "CEO",
19
},
20
friendlyName: "Acme, Inc Authorized Rep 1",
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": "Acme, Inc Authorized Rep 1",
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
}

You may provide a second authorized representative by repeating this request, but use authorized_representative_2 for the type parameter instead. You must also complete the next step again, but with the SID associated with the authorized_representative_2 EndUser.

1.5. Attach the EndUser resource to the Secondary Customer Profile

15-attach-the-enduser-resource-to-the-secondary-customer-profile page anchor
  • The sid in the path of this request is the SID of the Secondary Customer Profile from Step 1.1.
  • The object_sid is the EndUser resource SID from Step 1.4.
Attach the EndUser resource to the Secondary Customer ProfileLink to code sample: Attach the EndUser resource to the Secondary Customer 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("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.customerProfilesEntityAssignments.create({
14
objectSid: "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
15
});
16
17
console.log(customerProfilesEntityAssignment.sid);
18
}
19
20
createCustomerProfileEntityAssignment();

Output

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

1.6. Create an Address resource

16-create-an-address-resource page anchor

This API request creates an Address resource containing your customer's mailing address.

  • The friendly_name is an internal name. Use something descriptive, e.g., "Acme, Inc. Address".
  • This request also uses the following parameters and the corresponding values that you collected from your customer earlier:
    • city
    • customer_name
    • iso_country
    • postal_code
    • region
    • street
    • street_secondary (optional)
  • Save the sid in the response to this request. You need it in 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 createAddress() {
11
const address = await client.addresses.create({
12
city: "San Fransisco",
13
customerName: "Acme, Inc.",
14
isoCountry: "US",
15
postalCode: "12345",
16
region: "CA",
17
street: "1234 Market St",
18
});
19
20
console.log(address.accountSid);
21
}
22
23
createAddress();

Output

1
{
2
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"city": "San Fransisco",
4
"customer_name": "Acme, Inc.",
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": "US",
10
"postal_code": "12345",
11
"region": "CA",
12
"sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
13
"street": "1234 Market St",
14
"street_secondary": null,
15
"validated": false,
16
"verified": false,
17
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses/ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
18
}

1.7. Create a SupportingDocument resource

17-create-a-supportingdocument-resource page anchor

This step creates a SupportingDocument resource, which is how the TrustHub API stores the Address information.

  • The friendly_name is an internal name. Use something descriptive, e.g., "Acme, Inc. Address SupportingDocument".
  • The type parameter must be customer_profile_address .
  • The attributes parameter is an object with a property of address_sids . The value of this property is the Address SID from the previous step.
  • Save the sid in the response to this API request. You need it in 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 createSupportingDocument() {
11
const supportingDocument =
12
await client.trusthub.v1.supportingDocuments.create({
13
attributes: {
14
address_sids: "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
15
},
16
friendlyName: "acme",
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": "acme",
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
}

1.8. Attach the SupportingDocument resource to the Secondary Customer Profile

18-attach-the-supportingdocument-resource-to-the-secondary-customer-profile page anchor

This step associates the SupportingDocument resource with your customer's Secondary Customer Profile.

  • The sid in the path of this request is the SID of the Secondary Customer Profile from 1.1.
  • The object_sid is the SupportingDocument resource SID from Step 7.
Attach the SupportingDocument resource to the Secondary Customer ProfileLink to code sample: Attach the SupportingDocument resource to the Secondary Customer 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("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.customerProfilesEntityAssignments.create({
14
objectSid: "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
15
});
16
17
console.log(customerProfilesEntityAssignment.sid);
18
}
19
20
createCustomerProfileEntityAssignment();

Output

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

1.9. Evaluate the Secondary Customer Profile

19-evaluate-the-secondary-customer-profile page anchor

This API request runs an automated evaluation on the Secondary Customer Profile. The response from Twilio indicates whether or not all required information (as per the Policy) is present in the Secondary Customer Profile.

If there are no errors, the response contains a status of compliant. Otherwise, the status is noncompliant and the results property contains information about invalid or missing information.

  • The customer_profile_sid is the SID of the Secondary Customer Profile.
  • The policy_sid is RNdfbf3fae0e1107f8aded0e7cead80bf5 .
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 createCustomerProfileEvaluation() {
11
const customerProfilesEvaluation = await client.trusthub.v1
12
.customerProfiles("BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
13
.customerProfilesEvaluations.create({
14
policySid: "RNdfbf3fae0e1107f8aded0e7cead80bf5",
15
});
16
17
console.log(customerProfilesEvaluation.sid);
18
}
19
20
createCustomerProfileEvaluation();

Output

1
{
2
"sid": "ELaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"policy_sid": "RNdfbf3fae0e1107f8aded0e7cead80bf5",
5
"customer_profile_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
6
"status": "noncompliant",
7
"date_created": "2020-04-28T18:14:01Z",
8
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations/ELaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
"results": [
10
{
11
"friendly_name": "Business",
12
"object_type": "business",
13
"passed": false,
14
"failure_reason": "A Business End-User is missing. Please add one to the regulatory bundle.",
15
"error_code": 22214,
16
"valid": [],
17
"invalid": [
18
{
19
"friendly_name": "Business Name",
20
"object_field": "business_name",
21
"failure_reason": "The Business Name is missing. Please enter in a Business Name on the Business information.",
22
"error_code": 22215
23
},
24
{
25
"friendly_name": "Business Registration Number",
26
"object_field": "business_registration_number",
27
"failure_reason": "The Business Registration Number is missing. Please enter in a Business Registration Number on the Business information.",
28
"error_code": 22215
29
},
30
{
31
"friendly_name": "First Name",
32
"object_field": "first_name",
33
"failure_reason": "The First Name is missing. Please enter in a First Name on the Business information.",
34
"error_code": 22215
35
},
36
{
37
"friendly_name": "Last Name",
38
"object_field": "last_name",
39
"failure_reason": "The Last Name is missing. Please enter in a Last Name on the Business information.",
40
"error_code": 22215
41
}
42
],
43
"requirement_friendly_name": "Business",
44
"requirement_name": "business_info"
45
},
46
{
47
"friendly_name": "Excerpt from the commercial register (Extrait K-bis) showing name of Authorized Representative",
48
"object_type": "commercial_registrar_excerpt",
49
"passed": false,
50
"failure_reason": "An Excerpt from the commercial register (Extrait K-bis) showing name of Authorized Representative is missing. Please add one to the regulatory bundle.",
51
"error_code": 22216,
52
"valid": [],
53
"invalid": [
54
{
55
"friendly_name": "Business Name",
56
"object_field": "business_name",
57
"failure_reason": "The Business Name is missing. Or, it does not match the Business Name you entered within Business information. Please enter in the Business Name shown on the Excerpt from the commercial register (Extrait K-bis) showing name of Authorized Representative or make sure both Business Name fields use the same exact inputs.",
58
"error_code": 22217
59
}
60
],
61
"requirement_friendly_name": "Business Name",
62
"requirement_name": "business_name_info"
63
},
64
{
65
"friendly_name": "Excerpt from the commercial register showing French address",
66
"object_type": "commercial_registrar_excerpt",
67
"passed": false,
68
"failure_reason": "An Excerpt from the commercial register showing French address is missing. Please add one to the regulatory bundle.",
69
"error_code": 22216,
70
"valid": [],
71
"invalid": [
72
{
73
"friendly_name": "Address sid(s)",
74
"object_field": "address_sids",
75
"failure_reason": "The Address is missing. Please enter in the address shown on the Excerpt from the commercial register showing French address.",
76
"error_code": 22219
77
}
78
],
79
"requirement_friendly_name": "Business Address (Proof of Address)",
80
"requirement_name": "business_address_proof_info"
81
},
82
{
83
"friendly_name": "Excerpt from the commercial register (Extrait K-bis)",
84
"object_type": "commercial_registrar_excerpt",
85
"passed": false,
86
"failure_reason": "An Excerpt from the commercial register (Extrait K-bis) is missing. Please add one to the regulatory bundle.",
87
"error_code": 22216,
88
"valid": [],
89
"invalid": [
90
{
91
"friendly_name": "Document Number",
92
"object_field": "document_number",
93
"failure_reason": "The Document Number is missing. Please enter in the Document Number shown on the Excerpt from the commercial register (Extrait K-bis).",
94
"error_code": 22217
95
}
96
],
97
"requirement_friendly_name": "Business Registration Number",
98
"requirement_name": "business_reg_no_info"
99
},
100
{
101
"friendly_name": "Government-issued ID",
102
"object_type": "government_issued_document",
103
"passed": false,
104
"failure_reason": "A Government-issued ID is missing. Please add one to the regulatory bundle.",
105
"error_code": 22216,
106
"valid": [],
107
"invalid": [
108
{
109
"friendly_name": "First Name",
110
"object_field": "first_name",
111
"failure_reason": "The First Name is missing. Or, it does not match the First Name you entered within Business information. Please enter in the First Name shown on the Government-issued ID or make sure both First Name fields use the same exact inputs.",
112
"error_code": 22217
113
},
114
{
115
"friendly_name": "Last Name",
116
"object_field": "last_name",
117
"failure_reason": "The Last Name is missing. Or, it does not match the Last Name you entered within Business information. Please enter in the Last Name shown on the Government-issued ID or make sure both Last Name fields use the same exact inputs.",
118
"error_code": 22217
119
}
120
],
121
"requirement_friendly_name": "Name of Authorized Representative",
122
"requirement_name": "name_of_auth_rep_info"
123
},
124
{
125
"friendly_name": "Executed Copy of Power of Attorney",
126
"object_type": "power_of_attorney",
127
"passed": false,
128
"failure_reason": "An Executed Copy of Power of Attorney is missing. Please add one to the regulatory bundle.",
129
"error_code": 22216,
130
"valid": [],
131
"invalid": [],
132
"requirement_friendly_name": "Power of Attorney",
133
"requirement_name": "power_of_attorney_info"
134
},
135
{
136
"friendly_name": "Government-issued ID",
137
"object_type": "government_issued_document",
138
"passed": false,
139
"failure_reason": "A Government-issued ID is missing. Please add one to the regulatory bundle.",
140
"error_code": 22216,
141
"valid": [],
142
"invalid": [
143
{
144
"friendly_name": "First Name",
145
"object_field": "first_name",
146
"failure_reason": "The First Name is missing on the Governnment-Issued ID.",
147
"error_code": 22217
148
},
149
{
150
"friendly_name": "Last Name",
151
"object_field": "last_name",
152
"failure_reason": "The Last Name is missing on the Government-issued ID",
153
"error_code": 22217
154
}
155
],
156
"requirement_friendly_name": "Name of Person granted the Power of Attorney",
157
"requirement_name": "name_in_power_of_attorney_info"
158
}
159
]
160
}

1.10. Submit the Secondary Customer Profile for review

110-submit-the-secondary-customer-profile-for-review page anchor

This API request submits the Secondary Customer Profile for review.

  • The sid is the SID of the Secondary Customer Profile.
  • The status must be pending_review .

After submitting, you can proceed to the next step. The Secondary Customer Profile does not need to have an approved status in order to continue.

Submit the secondary customer profile for reviewLink to code sample: Submit the secondary customer profile for review
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("BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
13
.update({ status: "pending-review" });
14
15
console.log(customerProfile.sid);
16
}
17
18
updateCustomerProfile();

Output

1
{
2
"sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
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
}

2. Create and submit a TrustProduct

2-create-and-submit-a-trustproduct page anchor

This section of the onboarding guide covers creating and submitting a TrustProduct resource via the TrustHub API. This TrustProduct is a "container" for some additional business information that TCR requires.

In Step 2.1 below, you create the TrustProduct resource. Next, you provide the additional business information in an EndUser resource (Step 2.2) and then attach the EndUser resource to the TrustProuduct in Step 2.3. In Step 2.4, you attach the CustomerProfile resource to the TrustProduct resource. Finally, you check and submit the TrustProduct for review in Steps 2.5 and 2.6.

2.1. Create a TrustProduct resource

21-create-a-trustproduct-resource page anchor

This step creates a TrustProduct resource, which is a "container" for some additional business information that TCR requires.

  • The friendly_name is an internal name. Use something descriptive, e.g., "Acme, Inc. A2P Trust Product".
  • The email is the email address to which Twilio sends updates when the TrustProduct's status changes. This should be your (the ISV's) email address, not the customer's . You need to monitor this email address for changes in the TrustProduct's status .
  • The policy_sid must be RNb0d4771c2c98518d916a3d4cd70a8f8b
  • The status_callback is the URL to which Twilio sends status updates about the TrustProduct. This is optional, but recommended.
  • Save the sid returned by this request. You need it in later steps.
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: "ceo@example.com",
13
friendlyName: "Acme, Inc. A2P Trust Product",
14
policySid: "RNb0d4771c2c98518d916a3d4cd70a8f8b",
15
});
16
17
console.log(trustProduct.sid);
18
}
19
20
createTrustProduct();

Output

1
{
2
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"policy_sid": "RNb0d4771c2c98518d916a3d4cd70a8f8b",
5
"friendly_name": "Acme, Inc. A2P Trust Product",
6
"status": "draft",
7
"email": "ceo@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.2. Create an EndUser resource of type us_a2p_messaging_profile_information

22-create-an-enduser-resource-of-type-us_a2p_messaging_profile_information page anchor

This step creates an EndUser resource that contains the additional information required by TCR.

  • The type parameter must be us_a2p_messaging_profile_information .
  • The friendly-name is an internal name. Use something descriptive, e.g., "Acme, Inc. Messaging Profile EndUser".
  • All of the specific business information is passed in within the attributes parameter, as an object.
    • The attributes object contains the following parameters and the corresponding values that you collected from your customer earlier:
      • company_type
      • stock_exchange (if applicable)
      • stock_ticker (if applicable)
    • If the company_type is anything other than public , omit the stock_ticker and stock_exchange properties.
  • The brand_contact_email needs to be provided as part of brand regstriation where a 2FA email will be sent for the brand contact to verify for public, for profit brands.

The example below shows a request for creating this EndUser resource for a public company.

Create an EndUser resource of type us_a2p_messaging_profile_information for a public companyLink to code sample: Create an EndUser resource of type us_a2p_messaging_profile_information for a public company
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
company_type: "public",
14
stock_exchange: "NYSE",
15
stock_ticker: "ACME",
16
},
17
friendlyName: "Acme, Inc. Messaging Profile EndUser",
18
type: "us_a2p_messaging_profile_information",
19
});
20
21
console.log(endUser.sid);
22
}
23
24
createEndUser();

Output

1
{
2
"date_updated": "2021-02-16T20:40:57Z",
3
"sid": "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"friendly_name": "Acme, Inc. Messaging Profile EndUser",
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": "us_a2p_messaging_profile_information"
17
}

2.3. Attach the EndUser to the TrustProduct

23-attach-the-enduser-to-the-trustproduct page anchor

This step attaches the EndUser resource to the TrustProduct resource.

  • The sid in the path of this request is the SID of the TrustProduct.
  • The object_sid is the EndUser resource SID from the previous 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 createTrustProductEntityAssignment() {
11
const trustProductsEntityAssignment = await client.trusthub.v1
12
.trustProducts("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.trustProductsEntityAssignments.create({
14
objectSid: "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
15
});
16
17
console.log(trustProductsEntityAssignment.sid);
18
}
19
20
createTrustProductEntityAssignment();

Output

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

2.4. Attach the Secondary Customer Profile to the TrustProduct

24-attach-the-secondary-customer-profile-to-the-trustproduct page anchor

This step attaches the CustomerProfile resource to the TrustProduct.

  • The sid in the path of this request is the SID of the TrustProduct.
  • The object_sid is the SID of the Secondary Customer Profile from Step 1.1.
Attach Secondary Customer Profile to the TrustProductLink to code sample: Attach Secondary Customer Profile to the TrustProduct
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("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.trustProductsEntityAssignments.create({
14
objectSid: "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
15
});
16
17
console.log(trustProductsEntityAssignment.sid);
18
}
19
20
createTrustProductEntityAssignment();

Output

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

2.5. Evaluate the TrustProduct

25-evaluate-the-trustproduct page anchor

This API request runs an automated evaluation on the TrustProduct. The response from Twilio indicates whether or not all required information (as per the Policy) is present in the TrustProduct.

If there are no errors, the response contains a status of compliant. Otherwise, the status is noncompliant and the results property contains information about invalid or missing information.

  • The trust_product_sid is the SID of the TrustProduct.
  • The policy_sid must be RNb0d4771c2c98518d916a3d4cd70a8f8b .
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 createTrustProductEvaluation() {
11
const trustProductsEvaluation = await client.trusthub.v1
12
.trustProducts("BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
13
.trustProductsEvaluations.create({
14
policySid: "RNb0d4771c2c98518d916a3d4cd70a8f8b",
15
});
16
17
console.log(trustProductsEvaluation.sid);
18
}
19
20
createTrustProductEvaluation();

Output

1
{
2
"sid": "ELaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"policy_sid": "RNb0d4771c2c98518d916a3d4cd70a8f8b",
5
"trust_product_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
6
"status": "noncompliant",
7
"date_created": "2020-04-28T18:14:01Z",
8
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations/ELaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
"results": [
10
{
11
"friendly_name": "Business",
12
"object_type": "business",
13
"passed": false,
14
"failure_reason": "A Business End-User is missing. Please add one to the regulatory bundle.",
15
"error_code": 22214,
16
"valid": [],
17
"invalid": [
18
{
19
"friendly_name": "Business Name",
20
"object_field": "business_name",
21
"failure_reason": "The Business Name is missing. Please enter in a Business Name on the Business information.",
22
"error_code": 22215
23
},
24
{
25
"friendly_name": "Business Registration Number",
26
"object_field": "business_registration_number",
27
"failure_reason": "The Business Registration Number is missing. Please enter in a Business Registration Number on the Business information.",
28
"error_code": 22215
29
},
30
{
31
"friendly_name": "First Name",
32
"object_field": "first_name",
33
"failure_reason": "The First Name is missing. Please enter in a First Name on the Business information.",
34
"error_code": 22215
35
},
36
{
37
"friendly_name": "Last Name",
38
"object_field": "last_name",
39
"failure_reason": "The Last Name is missing. Please enter in a Last Name on the Business information.",
40
"error_code": 22215
41
}
42
],
43
"requirement_friendly_name": "Business",
44
"requirement_name": "business_info"
45
},
46
{
47
"friendly_name": "Excerpt from the commercial register (Extrait K-bis) showing name of Authorized Representative",
48
"object_type": "commercial_registrar_excerpt",
49
"passed": false,
50
"failure_reason": "An Excerpt from the commercial register (Extrait K-bis) showing name of Authorized Representative is missing. Please add one to the regulatory bundle.",
51
"error_code": 22216,
52
"valid": [],
53
"invalid": [
54
{
55
"friendly_name": "Business Name",
56
"object_field": "business_name",
57
"failure_reason": "The Business Name is missing. Or, it does not match the Business Name you entered within Business information. Please enter in the Business Name shown on the Excerpt from the commercial register (Extrait K-bis) showing name of Authorized Representative or make sure both Business Name fields use the same exact inputs.",
58
"error_code": 22217
59
}
60
],
61
"requirement_friendly_name": "Business Name",
62
"requirement_name": "business_name_info"
63
},
64
{
65
"friendly_name": "Excerpt from the commercial register showing French address",
66
"object_type": "commercial_registrar_excerpt",
67
"passed": false,
68
"failure_reason": "An Excerpt from the commercial register showing French address is missing. Please add one to the regulatory bundle.",
69
"error_code": 22216,
70
"valid": [],
71
"invalid": [
72
{
73
"friendly_name": "Address sid(s)",
74
"object_field": "address_sids",
75
"failure_reason": "The Address is missing. Please enter in the address shown on the Excerpt from the commercial register showing French address.",
76
"error_code": 22219
77
}
78
],
79
"requirement_friendly_name": "Business Address (Proof of Address)",
80
"requirement_name": "business_address_proof_info"
81
},
82
{
83
"friendly_name": "Excerpt from the commercial register (Extrait K-bis)",
84
"object_type": "commercial_registrar_excerpt",
85
"passed": false,
86
"failure_reason": "An Excerpt from the commercial register (Extrait K-bis) is missing. Please add one to the regulatory bundle.",
87
"error_code": 22216,
88
"valid": [],
89
"invalid": [
90
{
91
"friendly_name": "Document Number",
92
"object_field": "document_number",
93
"failure_reason": "The Document Number is missing. Please enter in the Document Number shown on the Excerpt from the commercial register (Extrait K-bis).",
94
"error_code": 22217
95
}
96
],
97
"requirement_friendly_name": "Business Registration Number",
98
"requirement_name": "business_reg_no_info"
99
},
100
{
101
"friendly_name": "Government-issued ID",
102
"object_type": "government_issued_document",
103
"passed": false,
104
"failure_reason": "A Government-issued ID is missing. Please add one to the regulatory bundle.",
105
"error_code": 22216,
106
"valid": [],
107
"invalid": [
108
{
109
"friendly_name": "First Name",
110
"object_field": "first_name",
111
"failure_reason": "The First Name is missing. Or, it does not match the First Name you entered within Business information. Please enter in the First Name shown on the Government-issued ID or make sure both First Name fields use the same exact inputs.",
112
"error_code": 22217
113
},
114
{
115
"friendly_name": "Last Name",
116
"object_field": "last_name",
117
"failure_reason": "The Last Name is missing. Or, it does not match the Last Name you entered within Business information. Please enter in the Last Name shown on the Government-issued ID or make sure both Last Name fields use the same exact inputs.",
118
"error_code": 22217
119
}
120
],
121
"requirement_friendly_name": "Name of Authorized Representative",
122
"requirement_name": "name_of_auth_rep_info"
123
},
124
{
125
"friendly_name": "Executed Copy of Power of Attorney",
126
"object_type": "power_of_attorney",
127
"passed": false,
128
"failure_reason": "An Executed Copy of Power of Attorney is missing. Please add one to the regulatory bundle.",
129
"error_code": 22216,
130
"valid": [],
131
"invalid": [],
132
"requirement_friendly_name": "Power of Attorney",
133
"requirement_name": "power_of_attorney_info"
134
},
135
{
136
"friendly_name": "Government-issued ID",
137
"object_type": "government_issued_document",
138
"passed": false,
139
"failure_reason": "A Government-issued ID is missing. Please add one to the regulatory bundle.",
140
"error_code": 22216,
141
"valid": [],
142
"invalid": [
143
{
144
"friendly_name": "First Name",
145
"object_field": "first_name",
146
"failure_reason": "The First Name is missing on the Governnment-Issued ID.",
147
"error_code": 22217
148
},
149
{
150
"friendly_name": "Last Name",
151
"object_field": "last_name",
152
"failure_reason": "The Last Name is missing on the Government-issued ID",
153
"error_code": 22217
154
}
155
],
156
"requirement_friendly_name": "Name of Person granted the Power of Attorney",
157
"requirement_name": "name_in_power_of_attorney_info"
158
}
159
]
160
}

Address any errors before continuing to the next step.

2.6. Submit the TrustProduct for review

26-submit-the-trustproduct-for-review page anchor

This API request submits the TrustProduct for review.

  • The sid is the SID of the TrustProduct.
  • The status must be pending_review .
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("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.update({ status: "pending-review" });
14
15
console.log(trustProduct.sid);
16
}
17
18
updateTrustProduct();

Output

1
{
2
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
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
}

Continue to the next step. You don't need to wait for this TrustProduct's status to be approved.


3. Create a BrandRegistration

3-create-a-brandregistration page anchor
(warning)

Warning

Please rate limit all API requests for Brand and Campaign registration to one request per second.

This API request creates a BrandRegistration resource, which represents your customer's Brand. Creating the BrandRegistration resource submits all of the Brand-related information for vetting by TCR.

(warning)

Warning

This API request incurs fees on your Twilio Account. Learn more about A2P 10DLC registration fees in the What pricing and fees are associated with the A2P 10DLC service? Help Center article(link takes you to an external page).

  • The customer_profile_bundle_sid is the SID of your customer's Secondary Customer Profile.
  • The a2p_profile_bundle_sid is the SID of the TrustProduct created in Step 2.1.
  • skip_automatic_sec_vet is an optional Boolean. You should omit this parameter unless you know the Brand should skip secondary vetting. Read the A2P 10DLC - Gather Business Information page for more details.
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 createBrandRegistrations() {
11
const brandRegistration = await client.messaging.v1.brandRegistrations.create(
12
{
13
a2PProfileBundleSid: "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
14
customerProfileBundleSid: "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
15
}
16
);
17
18
console.log(brandRegistration.sid);
19
}
20
21
createBrandRegistrations();

Output

1
{
2
"sid": "BN0044409f7e067e279523808d267e2d85",
3
"account_sid": "AC78e8e67fc0246521490fb9907fd0c165",
4
"customer_profile_bundle_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
5
"a2p_profile_bundle_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
6
"date_created": "2021-01-28T10:45:51Z",
7
"date_updated": "2021-01-28T10:45:51Z",
8
"brand_type": "STANDARD",
9
"status": "PENDING",
10
"tcr_id": "BXXXXXX",
11
"failure_reason": "Registration error",
12
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85",
13
"brand_score": 42,
14
"brand_feedback": [
15
"TAX_ID",
16
"NONPROFIT"
17
],
18
"identity_status": "VERIFIED",
19
"russell_3000": true,
20
"government_entity": false,
21
"tax_exempt_status": "501c3",
22
"skip_automatic_sec_vet": false,
23
"errors": [],
24
"mock": false,
25
"links": {
26
"brand_vettings": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/Vettings",
27
"brand_registration_otps": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/SmsOtp"
28
}
29
}

The example below shows how to skip secondary vetting for the Brand. (Only for Low-Volume Standard Brands and 527 Political organizations)

Create a BrandRegistration resource - Skip secondary vettingLink to code sample: Create a BrandRegistration resource - Skip secondary vetting
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 createBrandRegistrations() {
11
const brandRegistration = await client.messaging.v1.brandRegistrations.create(
12
{
13
a2PProfileBundleSid: "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
14
customerProfileBundleSid: "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
15
skipAutomaticSecVet: true,
16
}
17
);
18
19
console.log(brandRegistration.sid);
20
}
21
22
createBrandRegistrations();

Output

1
{
2
"sid": "BN0044409f7e067e279523808d267e2d85",
3
"account_sid": "AC78e8e67fc0246521490fb9907fd0c165",
4
"customer_profile_bundle_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
5
"a2p_profile_bundle_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
6
"date_created": "2021-01-28T10:45:51Z",
7
"date_updated": "2021-01-28T10:45:51Z",
8
"brand_type": "STANDARD",
9
"status": "PENDING",
10
"tcr_id": "BXXXXXX",
11
"failure_reason": "Registration error",
12
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85",
13
"brand_score": 42,
14
"brand_feedback": [
15
"TAX_ID",
16
"NONPROFIT"
17
],
18
"identity_status": "VERIFIED",
19
"russell_3000": true,
20
"government_entity": false,
21
"tax_exempt_status": "501c3",
22
"skip_automatic_sec_vet": true,
23
"errors": [],
24
"mock": false,
25
"links": {
26
"brand_vettings": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/Vettings",
27
"brand_registration_otps": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/SmsOtp"
28
}
29
}

Save the sid from the response. You need this in a later step.

(information)

Info

Sometimes, Brand vetting by TCR can take several days.

If the BrandRegistration resources's status is IN_REVIEW for more than two days, contact Support(link takes you to an external page).


4. Create a Messaging Service

4-create-a-messaging-service page anchor

Your customer needs a Messaging Service through which it handles its A2P 10DLC messaging.

This section covers the creation of a new Messaging Service. You should create a new Messaging Service for A2P 10DLC rather than reuse an existing one.

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 createService() {
11
const service = await client.messaging.v1.services.create({
12
fallbackUrl: "https://www.example.com/fallback",
13
friendlyName: "Acme, Inc.'s A2P 10DLC Messaging Service",
14
inboundRequestUrl: "https://www.example.com/inbound-messages-webhook",
15
});
16
17
console.log(service.sid);
18
}
19
20
createService();

Output

1
{
2
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"date_created": "2015-07-30T20:12:31Z",
5
"date_updated": "2015-07-30T20:12:33Z",
6
"friendly_name": "Acme, Inc.'s A2P 10DLC Messaging Service",
7
"inbound_request_url": "https://www.example.com/inbound-messages-webhook",
8
"inbound_method": "POST",
9
"fallback_url": "https://www.example.com/fallback",
10
"fallback_method": "GET",
11
"status_callback": "https://www.example.com",
12
"sticky_sender": true,
13
"smart_encoding": false,
14
"mms_converter": true,
15
"fallback_to_long_code": true,
16
"scan_message_content": "inherit",
17
"area_code_geomatch": true,
18
"validity_period": 600,
19
"synchronous_validation": true,
20
"usecase": "marketing",
21
"us_app_to_person_registered": false,
22
"use_inbound_webhook_on_number": true,
23
"sending_windows": [],
24
"links": {
25
"phone_numbers": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers",
26
"short_codes": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ShortCodes",
27
"alpha_senders": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AlphaSenders",
28
"messages": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages",
29
"us_app_to_person": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p",
30
"us_app_to_person_usecases": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/Usecases",
31
"channel_senders": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelSenders"
32
},
33
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
34
}

Save the SID returned by this request; you need it in a later step. You can also find Messaging Service SIDs in the Console or by using the Read multiple Service resources API request.

This request creates an unconfigured Messaging Service. Read the Messaging Service docs to learn more about how to configure a Messaging Service.

(error)

Danger

Do not continue to the next step until the BrandRegistration's status is APPROVED.


5. Create an A2P Campaign

5-create-an-a2p-campaign page anchor

This section covers the creation of a UsAppToPerson resource, which contains the information about the business' messaging Campaign and Use Case.

(error)

Danger

Do not complete this section until the BrandRegistration's status is APPROVED.

5.1 Fetch possible A2P Campaign Use Cases

51-fetch-possible-a2p-campaign-use-cases page anchor

Once a BrandRegistration's status is approved, you can find out which Use Cases are available for your customer. The API request below returns all of the possible A2P Use Cases that your customer's Brand can use for an A2P Campaign.

  • The messaging_service_sid is the SID of the Messaging Service from Step 4 above.
  • The brand_registration_sid is the SID of the BrandRegistration resource you created in Step 3.
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 fetchUsAppToPersonUsecase() {
11
const usAppToPersonUsecase = await client.messaging.v1
12
.services("MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
13
.usAppToPersonUsecases.fetch({
14
brandRegistrationSid: "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
15
});
16
17
console.log(usAppToPersonUsecase.usAppToPersonUsecases);
18
}
19
20
fetchUsAppToPersonUsecase();

Output

1
{
2
"us_app_to_person_usecases": [
3
{
4
"code": "2FA",
5
"name": "Two-Factor authentication (2FA)",
6
"description": "Two-Factor authentication, one-time use password, password reset",
7
"post_approval_required": false
8
},
9
{
10
"code": "ACCOUNT_NOTIFICATION",
11
"name": "Account Notification",
12
"description": "All reminders, alerts, and notifications. (Examples include: flight delayed, hotel booked, appointment reminders.)",
13
"post_approval_required": false
14
},
15
{
16
"code": "AGENTS_FRANCHISES",
17
"name": "Agents and Franchises",
18
"description": "For brands that have multiple agents, franchises or offices in the same brand vertical, but require individual localised numbers per agent/location/office.",
19
"post_approval_required": true
20
},
21
{
22
"code": "CHARITY",
23
"name": "Charity",
24
"description": "Includes: 5013C Charity\nDoes not include: Religious organizations",
25
"post_approval_required": false
26
},
27
{
28
"code": "PROXY",
29
"name": "Proxy",
30
"description": "Peer-to-peer app-based group messaging with proxy/pooled numbers (For example: GroupMe)\nSupporting personalized services and non-exposure of personal numbers for enterprise or A2P communications. (Examples include: Uber and AirBnb.)",
31
"post_approval_required": true
32
},
33
{
34
"code": "CUSTOMER_CARE",
35
"name": "Customer Care",
36
"description": "All customer care messaging, including account management and support",
37
"post_approval_required": false
38
},
39
{
40
"code": "DELIVERY_NOTIFICATION",
41
"name": "Delivery Notification",
42
"description": "Information about the status of the delivery of a product or service",
43
"post_approval_required": false
44
},
45
{
46
"code": "EMERGENCY",
47
"name": "Emergency",
48
"description": "Notification services designed to support public safety / health during natural disasters, armed conflicts, pandemics and other national or regional emergencies",
49
"post_approval_required": true
50
},
51
{
52
"code": "FRAUD_ALERT",
53
"name": "Fraud Alert Messaging",
54
"description": "Fraud alert notification",
55
"post_approval_required": false
56
},
57
{
58
"code": "HIGHER_EDUCATION",
59
"name": "Higher Education",
60
"description": "For campaigns created on behalf of Colleges or Universities and will also include School Districts etc that fall outside of any \"free to the consumer\" messaging model",
61
"post_approval_required": false
62
},
63
{
64
"code": "K12_EDUCATION",
65
"name": "K-12 Education",
66
"description": "Campaigns created for messaging platforms that support schools from grades K-12 and distance learning centers. This is not for Post-Secondary schools.",
67
"post_approval_required": true
68
},
69
{
70
"code": "LOW_VOLUME",
71
"name": "Low Volume Mixed",
72
"description": "Low throughput, any combination of use-cases. Examples include: test, demo accounts",
73
"post_approval_required": false
74
},
75
{
76
"code": "MARKETING",
77
"name": "Marketing",
78
"description": "Any communication with marketing and/or promotional content",
79
"post_approval_required": false
80
},
81
{
82
"code": "MIXED",
83
"name": "Mixed",
84
"description": "Mixed messaging reserved for specific consumer service industry",
85
"post_approval_required": false
86
},
87
{
88
"code": "POLITICAL",
89
"name": "Political",
90
"description": "Part of organized effort to influence decision making of specific group. All campaigns to be verified",
91
"post_approval_required": false
92
},
93
{
94
"code": "POLLING_VOTING",
95
"name": "Polling and voting",
96
"description": "Polling and voting",
97
"post_approval_required": false
98
},
99
{
100
"code": "PUBLIC_SERVICE_ANNOUNCEMENT",
101
"name": "Public Service Announcement",
102
"description": "An informational message that is meant to raise the audience awareness about an important issue",
103
"post_approval_required": false
104
},
105
{
106
"code": "SECURITY_ALERT",
107
"name": "Security Alert",
108
"description": "A notification that the security of a system, either software or hardware, has been compromised in some way and there is an action you need to take",
109
"post_approval_required": false
110
},
111
{
112
"code": "SOCIAL",
113
"name": "Social",
114
"description": "Communication within or between closed communities (For example: influencers alerts)",
115
"post_approval_required": true
116
},
117
{
118
"code": "SWEEPSTAKE",
119
"name": "Sweepstake",
120
"description": "Sweepstake",
121
"post_approval_required": true
122
}
123
]
124
}

Choose the Use Case that best aligns with your customer's business needs. This is used in the next step.

5.2 Create A2P Campaign

52-create-a2p-campaign page anchor