Skip to contentSkip to navigationSkip to topbar
Rate this page:
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)e. 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 Profile

create-a-secondary-customer-profile 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
import twilio from "twilio";
_17
_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 = twilio(accountSid, authToken);
_17
_17
const customerProfile = await client.trusthub.v1.customerProfiles.create({
_17
email: "acme-inc@example.com",
_17
friendlyName: "Acme, Inc. Secondary Customer Profile",
_17
policySid: "RNdfbf3fae0e1107f8aded0e7cead80bf5",
_17
statusCallback: "https://www.example.com/status-callback-endpoint",
_17
});
_17
_17
console.log(customerProfile.sid);

Output

_19
{
_19
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"policy_sid": "RNdfbf3fae0e1107f8aded0e7cead80bf5",
_19
"friendly_name": "Acme, Inc. Secondary Customer Profile",
_19
"status": "draft",
_19
"email": "acme-inc@example.com",
_19
"status_callback": "https://www.example.com/status-callback-endpoint",
_19
"valid_until": null,
_19
"date_created": "2019-07-30T22:29:24Z",
_19
"date_updated": "2019-07-31T01:09:00Z",
_19
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"links": {
_19
"customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
_19
"customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
_19
"customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
_19
},
_19
"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_information

create-enduser-of-type-customer_profile_business_information page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_26
// Download the helper library from https://www.twilio.com/docs/node/install
_26
import twilio from "twilio";
_26
_26
// Find your Account SID and Auth Token at twilio.com/console
_26
// and set the environment variables. See http://twil.io/secure
_26
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_26
const authToken = process.env.TWILIO_AUTH_TOKEN;
_26
const client = twilio(accountSid, authToken);
_26
_26
const endUser = await client.trusthub.v1.endUsers.create({
_26
attributes: {
_26
business_name: "Acme, Inc.",
_26
social_media_profile_urls: "https://example.com/acme-social-media-profile",
_26
website_url: "https://www.example.com",
_26
business_regions_of_operation: "USA_AND_CANADA",
_26
business_type: "Partnership",
_26
business_registration_identifier: "EIN",
_26
business_identity: "direct_customer",
_26
business_industry: "EDUCATION",
_26
business_registration_number: "123456789",
_26
},
_26
friendlyName: "Acme, Inc. - Business Information EndUser resource",
_26
type: "customer_profile_business_information",
_26
});
_26
_26
console.log(endUser.sid);

Output

_17
{
_17
"date_updated": "2021-02-16T20:40:57Z",
_17
"sid": "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"friendly_name": "Acme, Inc. - Business Information EndUser resource",
_17
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"url": "https://trusthub.twilio.com/v1/EndUsers/ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"date_created": "2021-02-16T20:40:57Z",
_17
"attributes": {
_17
"phone_number": "+11234567890",
_17
"job_position": "CEO",
_17
"first_name": "rep1",
_17
"last_name": "test",
_17
"business_title": "ceo",
_17
"email": "foobar@test.com"
_17
},
_17
"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 Profile

attach-the-enduser-resource-to-the-secondary-customer-profile 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
import twilio from "twilio";
_16
_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 = twilio(accountSid, authToken);
_16
_16
const customerProfilesEntityAssignment = await client.trusthub.v1
_16
.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_16
.customerProfilesEntityAssignments.create({
_16
objectSid: "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
});
_16
_16
console.log(customerProfilesEntityAssignment.sid);

Output

_10
{
_10
"sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"customer_profile_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"object_sid": "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"date_created": "2019-07-31T02:34:41Z",
_10
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_10
}

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_1

create-enduser-of-type-authorized_representative_1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_23
// Download the helper library from https://www.twilio.com/docs/node/install
_23
import twilio from "twilio";
_23
_23
// Find your Account SID and Auth Token at twilio.com/console
_23
// and set the environment variables. See http://twil.io/secure
_23
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_23
const authToken = process.env.TWILIO_AUTH_TOKEN;
_23
const client = twilio(accountSid, authToken);
_23
_23
const endUser = await client.trusthub.v1.endUsers.create({
_23
attributes: {
_23
job_position: "CEO",
_23
last_name: "Doe",
_23
phone_number: "+12225557890",
_23
first_name: "Jane",
_23
email: "jdoe@example.com",
_23
business_title: "CEO",
_23
},
_23
friendlyName: "Acme, Inc Authorized Rep 1",
_23
type: "authorized_representative_1",
_23
});
_23
_23
console.log(endUser.sid);

Output

_17
{
_17
"date_updated": "2021-02-16T20:40:57Z",
_17
"sid": "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"friendly_name": "Acme, Inc Authorized Rep 1",
_17
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"url": "https://trusthub.twilio.com/v1/EndUsers/ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"date_created": "2021-02-16T20:40:57Z",
_17
"attributes": {
_17
"phone_number": "+11234567890",
_17
"job_position": "CEO",
_17
"first_name": "rep1",
_17
"last_name": "test",
_17
"business_title": "ceo",
_17
"email": "foobar@test.com"
_17
},
_17
"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 Profile

attach-the-enduser-resource-to-the-secondary-customer-profile-1 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
import twilio from "twilio";
_16
_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 = twilio(accountSid, authToken);
_16
_16
const customerProfilesEntityAssignment = await client.trusthub.v1
_16
.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_16
.customerProfilesEntityAssignments.create({
_16
objectSid: "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
});
_16
_16
console.log(customerProfilesEntityAssignment.sid);

Output

_10
{
_10
"sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"customer_profile_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"object_sid": "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"date_created": "2019-07-31T02:34:41Z",
_10
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_10
}

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.

Create an Addresss resource

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

_19
// Download the helper library from https://www.twilio.com/docs/node/install
_19
import twilio from "twilio";
_19
_19
// Find your Account SID and Auth Token at twilio.com/console
_19
// and set the environment variables. See http://twil.io/secure
_19
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19
const authToken = process.env.TWILIO_AUTH_TOKEN;
_19
const client = twilio(accountSid, authToken);
_19
_19
const address = await client.addresses.create({
_19
city: "San Fransisco",
_19
customerName: "Acme, Inc.",
_19
isoCountry: "US",
_19
postalCode: "12345",
_19
region: "CA",
_19
street: "1234 Market St",
_19
});
_19
_19
console.log(address.accountSid);

Output

_18
{
_18
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"city": "San Fransisco",
_18
"customer_name": "Acme, Inc.",
_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": "US",
_18
"postal_code": "12345",
_18
"region": "CA",
_18
"sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"street": "1234 Market St",
_18
"street_secondary": null,
_18
"validated": false,
_18
"verified": false,
_18
"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.

Create a SupportingDocument

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

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
const supportingDocument = await client.trusthub.v1.supportingDocuments.create({
_18
attributes: {
_18
address_sids: "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
},
_18
friendlyName: "acme",
_18
type: "customer_profile_address",
_18
});
_18
_18
console.log(supportingDocument.sid);

Output

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

attach-the-supportingdocument-resource-to-the-secondary-customer-profile 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
import twilio from "twilio";
_16
_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 = twilio(accountSid, authToken);
_16
_16
const customerProfilesEntityAssignment = await client.trusthub.v1
_16
.customerProfiles("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_16
.customerProfilesEntityAssignments.create({
_16
objectSid: "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
});
_16
_16
console.log(customerProfilesEntityAssignment.sid);

Output

_10
{
_10
"sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"customer_profile_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"object_sid": "RDXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"date_created": "2019-07-31T02:34:41Z",
_10
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_10
}

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 .

Evaluate the Secondary Customer Profile

evaluate-the-secondary-customer-profile 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
import twilio from "twilio";
_16
_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 = twilio(accountSid, authToken);
_16
_16
const customerProfilesEvaluation = await client.trusthub.v1
_16
.customerProfiles("BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_16
.customerProfilesEvaluations.create({
_16
policySid: "RNdfbf3fae0e1107f8aded0e7cead80bf5",
_16
});
_16
_16
console.log(customerProfilesEvaluation.sid);

Output

_160
{
_160
"sid": "ELaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_160
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_160
"policy_sid": "RNdfbf3fae0e1107f8aded0e7cead80bf5",
_160
"customer_profile_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_160
"status": "noncompliant",
_160
"date_created": "2020-04-28T18:14:01Z",
_160
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations/ELaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_160
"results": [
_160
{
_160
"friendly_name": "Business",
_160
"object_type": "business",
_160
"passed": false,
_160
"failure_reason": "A Business End-User is missing. Please add one to the regulatory bundle.",
_160
"error_code": 22214,
_160
"valid": [],
_160
"invalid": [
_160
{
_160
"friendly_name": "Business Name",
_160
"object_field": "business_name",
_160
"failure_reason": "The Business Name is missing. Please enter in a Business Name on the Business information.",
_160
"error_code": 22215
_160
},
_160
{
_160
"friendly_name": "Business Registration Number",
_160
"object_field": "business_registration_number",
_160
"failure_reason": "The Business Registration Number is missing. Please enter in a Business Registration Number on the Business information.",
_160
"error_code": 22215
_160
},
_160
{
_160
"friendly_name": "First Name",
_160
"object_field": "first_name",
_160
"failure_reason": "The First Name is missing. Please enter in a First Name on the Business information.",
_160
"error_code": 22215
_160
},
_160
{
_160
"friendly_name": "Last Name",
_160
"object_field": "last_name",
_160
"failure_reason": "The Last Name is missing. Please enter in a Last Name on the Business information.",
_160
"error_code": 22215
_160
}
_160
],
_160
"requirement_friendly_name": "Business",
_160
"requirement_name": "business_info"
_160
},
_160
{
_160
"friendly_name": "Excerpt from the commercial register (Extrait K-bis) showing name of Authorized Representative",
_160
"object_type": "commercial_registrar_excerpt",
_160
"passed": false,
_160
"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.",
_160
"error_code": 22216,
_160
"valid": [],
_160
"invalid": [
_160
{
_160
"friendly_name": "Business Name",
_160
"object_field": "business_name",
_160
"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.",
_160
"error_code": 22217
_160
}
_160
],
_160
"requirement_friendly_name": "Business Name",
_160
"requirement_name": "business_name_info"
_160
},
_160
{
_160
"friendly_name": "Excerpt from the commercial register showing French address",
_160
"object_type": "commercial_registrar_excerpt",
_160
"passed": false,
_160
"failure_reason": "An Excerpt from the commercial register showing French address is missing. Please add one to the regulatory bundle.",
_160
"error_code": 22216,
_160
"valid": [],
_160
"invalid": [
_160
{
_160
"friendly_name": "Address sid(s)",
_160
"object_field": "address_sids",
_160
"failure_reason": "The Address is missing. Please enter in the address shown on the Excerpt from the commercial register showing French address.",
_160
"error_code": 22219
_160
}
_160
],
_160
"requirement_friendly_name": "Business Address (Proof of Address)",
_160
"requirement_name": "business_address_proof_info"
_160
},
_160
{
_160
"friendly_name": "Excerpt from the commercial register (Extrait K-bis)",
_160
"object_type": "commercial_registrar_excerpt",
_160
"passed": false,
_160
"failure_reason": "An Excerpt from the commercial register (Extrait K-bis) is missing. Please add one to the regulatory bundle.",
_160
"error_code": 22216,
_160
"valid": [],
_160
"invalid": [
_160
{
_160
"friendly_name": "Document Number",
_160
"object_field": "document_number",
_160
"failure_reason": "The Document Number is missing. Please enter in the Document Number shown on the Excerpt from the commercial register (Extrait K-bis).",
_160
"error_code": 22217
_160
}
_160
],
_160
"requirement_friendly_name": "Business Registration Number",
_160
"requirement_name": "business_reg_no_info"
_160
},
_160
{
_160
"friendly_name": "Government-issued ID",
_160
"object_type": "government_issued_document",
_160
"passed": false,
_160
"failure_reason": "A Government-issued ID is missing. Please add one to the regulatory bundle.",
_160
"error_code": 22216,
_160
"valid": [],
_160
"invalid": [
_160
{
_160
"friendly_name": "First Name",
_160
"object_field": "first_name",
_160
"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.",
_160
"error_code": 22217
_160
},
_160
{
_160
"friendly_name": "Last Name",
_160
"object_field": "last_name",
_160
"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.",
_160
"error_code": 22217
_160
}
_160
],
_160
"requirement_friendly_name": "Name of Authorized Representative",
_160
"requirement_name": "name_of_auth_rep_info"
_160
},
_160
{
_160
"friendly_name": "Executed Copy of Power of Attorney",
_160
"object_type": "power_of_attorney",
_160
"passed": false,
_160
"failure_reason": "An Executed Copy of Power of Attorney is missing. Please add one to the regulatory bundle.",
_160
"error_code": 22216,
_160
"valid": [],
_160
"invalid": [],
_160
"requirement_friendly_name": "Power of Attorney",
_160
"requirement_name": "power_of_attorney_info"
_160
},
_160
{
_160
"friendly_name": "Government-issued ID",
_160
"object_type": "government_issued_document",
_160
"passed": false,
_160
"failure_reason": "A Government-issued ID is missing. Please add one to the regulatory bundle.",
_160
"error_code": 22216,
_160
"valid": [],
_160
"invalid": [
_160
{
_160
"friendly_name": "First Name",
_160
"object_field": "first_name",
_160
"failure_reason": "The First Name is missing on the Governnment-Issued ID.",
_160
"error_code": 22217
_160
},
_160
{
_160
"friendly_name": "Last Name",
_160
"object_field": "last_name",
_160
"failure_reason": "The Last Name is missing on the Government-issued ID",
_160
"error_code": 22217
_160
}
_160
],
_160
"requirement_friendly_name": "Name of Person granted the Power of Attorney",
_160
"requirement_name": "name_in_power_of_attorney_info"
_160
}
_160
]
_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 review

submit-the-secondary-customer-profile-for-review 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
import twilio from "twilio";
_14
_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 = twilio(accountSid, authToken);
_14
_14
const customerProfile = await client.trusthub.v1
_14
.customerProfiles("BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_14
.update({ status: "pending-review" });
_14
_14
console.log(customerProfile.sid);

Output

_19
{
_19
"sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_19
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"friendly_name": "friendly_name",
_19
"status": "pending-review",
_19
"email": "email",
_19
"status_callback": "http://www.example.com",
_19
"valid_until": null,
_19
"date_created": "2019-07-30T22:29:24Z",
_19
"date_updated": "2019-07-31T01:09:00Z",
_19
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"links": {
_19
"customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
_19
"customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
_19
"customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
_19
},
_19
"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.

Create an empty A2P Trust Bundle

create-an-empty-a2p-trust-bundle 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
import twilio from "twilio";
_16
_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 = twilio(accountSid, authToken);
_16
_16
const trustProduct = await client.trusthub.v1.trustProducts.create({
_16
email: "ceo@example.com",
_16
friendlyName: "Acme, Inc. A2P Trust Product",
_16
policySid: "RNb0d4771c2c98518d916a3d4cd70a8f8b",
_16
});
_16
_16
console.log(trustProduct.sid);

Output

_19
{
_19
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"policy_sid": "RNb0d4771c2c98518d916a3d4cd70a8f8b",
_19
"friendly_name": "Acme, Inc. A2P Trust Product",
_19
"status": "draft",
_19
"email": "ceo@example.com",
_19
"status_callback": "http://www.example.com",
_19
"valid_until": null,
_19
"date_created": "2019-07-30T22:29:24Z",
_19
"date_updated": "2019-07-31T01:09:00Z",
_19
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"links": {
_19
"trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
_19
"trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
_19
"trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
_19
},
_19
"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 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 company

create-an-enduser-resource-of-type-us_a2p_messaging_profile_information-for-a-public-company page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_20
// Download the helper library from https://www.twilio.com/docs/node/install
_20
import twilio from "twilio";
_20
_20
// Find your Account SID and Auth Token at twilio.com/console
_20
// and set the environment variables. See http://twil.io/secure
_20
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_20
const authToken = process.env.TWILIO_AUTH_TOKEN;
_20
const client = twilio(accountSid, authToken);
_20
_20
const endUser = await client.trusthub.v1.endUsers.create({
_20
attributes: {
_20
company_type: "public",
_20
stock_exchange: "NYSE",
_20
stock_ticker: "ACME",
_20
},
_20
friendlyName: "Acme, Inc. Messaging Profile EndUser",
_20
type: "us_a2p_messaging_profile_information",
_20
});
_20
_20
console.log(endUser.sid);

Output

_17
{
_17
"date_updated": "2021-02-16T20:40:57Z",
_17
"sid": "ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"friendly_name": "Acme, Inc. Messaging Profile EndUser",
_17
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"url": "https://trusthub.twilio.com/v1/EndUsers/ITaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_17
"date_created": "2021-02-16T20:40:57Z",
_17
"attributes": {
_17
"phone_number": "+11234567890",
_17
"job_position": "CEO",
_17
"first_name": "rep1",
_17
"last_name": "test",
_17
"business_title": "ceo",
_17
"email": "foobar@test.com"
_17
},
_17
"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.

Attach the EndUser to the TrustProduct

attach-the-enduser-to-the-trustproduct 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
import twilio from "twilio";
_16
_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 = twilio(accountSid, authToken);
_16
_16
const trustProductsEntityAssignment = await client.trusthub.v1
_16
.trustProducts("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_16
.trustProductsEntityAssignments.create({
_16
objectSid: "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
});
_16
_16
console.log(trustProductsEntityAssignment.sid);

Output

_10
{
_10
"sid": "BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"trust_product_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"object_sid": "ITXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"date_created": "2019-07-31T02:34:41Z",
_10
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments/BVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_10
}

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 TrustProduct

attach-secondary-customer-profile-to-the-trustproduct 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
import twilio from "twilio";
_16
_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 = twilio(accountSid, authToken);
_16
_16
const trustProductsEntityAssignment = await client.trusthub.v1
_16
.trustProducts("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_16
.trustProductsEntityAssignments.create({
_16
objectSid: "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
});
_16
_16
console.log(trustProductsEntityAssignment.sid);

Output

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

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 .

Evaluate the TrustProduct

evaluate-the-trustproduct 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
import twilio from "twilio";
_16
_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 = twilio(accountSid, authToken);
_16
_16
const trustProductsEvaluation = await client.trusthub.v1
_16
.trustProducts("BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_16
.trustProductsEvaluations.create({
_16
policySid: "RNb0d4771c2c98518d916a3d4cd70a8f8b",
_16
});
_16
_16
console.log(trustProductsEvaluation.sid);

Output

_160
{
_160
"sid": "ELaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_160
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_160
"policy_sid": "RNb0d4771c2c98518d916a3d4cd70a8f8b",
_160
"trust_product_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_160
"status": "noncompliant",
_160
"date_created": "2020-04-28T18:14:01Z",
_160
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations/ELaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_160
"results": [
_160
{
_160
"friendly_name": "Business",
_160
"object_type": "business",
_160
"passed": false,
_160
"failure_reason": "A Business End-User is missing. Please add one to the regulatory bundle.",
_160
"error_code": 22214,
_160
"valid": [],
_160
"invalid": [
_160
{
_160
"friendly_name": "Business Name",
_160
"object_field": "business_name",
_160
"failure_reason": "The Business Name is missing. Please enter in a Business Name on the Business information.",
_160
"error_code": 22215
_160
},
_160
{
_160
"friendly_name": "Business Registration Number",
_160
"object_field": "business_registration_number",
_160
"failure_reason": "The Business Registration Number is missing. Please enter in a Business Registration Number on the Business information.",
_160
"error_code": 22215
_160
},
_160
{
_160
"friendly_name": "First Name",
_160
"object_field": "first_name",
_160
"failure_reason": "The First Name is missing. Please enter in a First Name on the Business information.",
_160
"error_code": 22215
_160
},
_160
{
_160
"friendly_name": "Last Name",
_160
"object_field": "last_name",
_160
"failure_reason": "The Last Name is missing. Please enter in a Last Name on the Business information.",
_160
"error_code": 22215
_160
}
_160
],
_160
"requirement_friendly_name": "Business",
_160
"requirement_name": "business_info"
_160
},
_160
{
_160
"friendly_name": "Excerpt from the commercial register (Extrait K-bis) showing name of Authorized Representative",
_160
"object_type": "commercial_registrar_excerpt",
_160
"passed": false,
_160
"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.",
_160
"error_code": 22216,
_160
"valid": [],
_160
"invalid": [
_160
{
_160
"friendly_name": "Business Name",
_160
"object_field": "business_name",
_160
"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.",
_160
"error_code": 22217
_160
}
_160
],
_160
"requirement_friendly_name": "Business Name",
_160
"requirement_name": "business_name_info"
_160
},
_160
{
_160
"friendly_name": "Excerpt from the commercial register showing French address",
_160
"object_type": "commercial_registrar_excerpt",
_160
"passed": false,
_160
"failure_reason": "An Excerpt from the commercial register showing French address is missing. Please add one to the regulatory bundle.",
_160
"error_code": 22216,
_160
"valid": [],
_160
"invalid": [
_160
{
_160
"friendly_name": "Address sid(s)",
_160
"object_field": "address_sids",
_160
"failure_reason": "The Address is missing. Please enter in the address shown on the Excerpt from the commercial register showing French address.",
_160
"error_code": 22219
_160
}
_160
],
_160
"requirement_friendly_name": "Business Address (Proof of Address)",
_160
"requirement_name": "business_address_proof_info"
_160
},
_160
{
_160
"friendly_name": "Excerpt from the commercial register (Extrait K-bis)",
_160
"object_type": "commercial_registrar_excerpt",
_160
"passed": false,
_160
"failure_reason": "An Excerpt from the commercial register (Extrait K-bis) is missing. Please add one to the regulatory bundle.",
_160
"error_code": 22216,
_160
"valid": [],
_160
"invalid": [
_160
{
_160
"friendly_name": "Document Number",
_160
"object_field": "document_number",
_160
"failure_reason": "The Document Number is missing. Please enter in the Document Number shown on the Excerpt from the commercial register (Extrait K-bis).",
_160
"error_code": 22217
_160
}
_160
],
_160
"requirement_friendly_name": "Business Registration Number",
_160
"requirement_name": "business_reg_no_info"
_160
},
_160
{
_160
"friendly_name": "Government-issued ID",
_160
"object_type": "government_issued_document",
_160
"passed": false,
_160
"failure_reason": "A Government-issued ID is missing. Please add one to the regulatory bundle.",
_160
"error_code": 22216,
_160
"valid": [],
_160
"invalid": [
_160
{
_160
"friendly_name": "First Name",
_160
"object_field": "first_name",
_160
"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.",
_160
"error_code": 22217
_160
},
_160
{
_160
"friendly_name": "Last Name",
_160
"object_field": "last_name",
_160
"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.",
_160
"error_code": 22217
_160
}
_160
],
_160
"requirement_friendly_name": "Name of Authorized Representative",
_160
"requirement_name": "name_of_auth_rep_info"
_160
},
_160
{
_160
"friendly_name": "Executed Copy of Power of Attorney",
_160
"object_type": "power_of_attorney",
_160
"passed": false,
_160
"failure_reason": "An Executed Copy of Power of Attorney is missing. Please add one to the regulatory bundle.",
_160
"error_code": 22216,
_160
"valid": [],
_160
"invalid": [],
_160
"requirement_friendly_name": "Power of Attorney",
_160
"requirement_name": "power_of_attorney_info"
_160
},
_160
{
_160
"friendly_name": "Government-issued ID",
_160
"object_type": "government_issued_document",
_160
"passed": false,
_160
"failure_reason": "A Government-issued ID is missing. Please add one to the regulatory bundle.",
_160
"error_code": 22216,
_160
"valid": [],
_160
"invalid": [
_160
{
_160
"friendly_name": "First Name",
_160
"object_field": "first_name",
_160
"failure_reason": "The First Name is missing on the Governnment-Issued ID.",
_160
"error_code": 22217
_160
},
_160
{
_160
"friendly_name": "Last Name",
_160
"object_field": "last_name",
_160
"failure_reason": "The Last Name is missing on the Government-issued ID",
_160
"error_code": 22217
_160
}
_160
],
_160
"requirement_friendly_name": "Name of Person granted the Power of Attorney",
_160
"requirement_name": "name_in_power_of_attorney_info"
_160
}
_160
]
_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 .

Submit the TrustProduct for review

submit-the-trustproduct-for-review 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
import twilio from "twilio";
_14
_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 = twilio(accountSid, authToken);
_14
_14
const trustProduct = await client.trusthub.v1
_14
.trustProducts("BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_14
.update({ status: "pending-review" });
_14
_14
console.log(trustProduct.sid);

Output

_19
{
_19
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"friendly_name": "friendly_name",
_19
"status": "pending-review",
_19
"email": "email",
_19
"status_callback": "http://www.example.com",
_19
"valid_until": null,
_19
"date_created": "2019-07-30T22:29:24Z",
_19
"date_updated": "2019-07-31T01:09:00Z",
_19
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19
"links": {
_19
"trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
_19
"trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
_19
"trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
_19
},
_19
"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.

Create a BrandRegistration resource

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

_15
// Download the helper library from https://www.twilio.com/docs/node/install
_15
import twilio from "twilio";
_15
_15
// Find your Account SID and Auth Token at twilio.com/console
_15
// and set the environment variables. See http://twil.io/secure
_15
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_15
const authToken = process.env.TWILIO_AUTH_TOKEN;
_15
const client = twilio(accountSid, authToken);
_15
_15
const brandRegistration = await client.messaging.v1.brandRegistrations.create({
_15
a2PProfileBundleSid: "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15
customerProfileBundleSid: "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15
});
_15
_15
console.log(brandRegistration.sid);

Output

_29
{
_29
"sid": "BN0044409f7e067e279523808d267e2d85",
_29
"account_sid": "AC78e8e67fc0246521490fb9907fd0c165",
_29
"customer_profile_bundle_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"a2p_profile_bundle_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"date_created": "2021-01-28T10:45:51Z",
_29
"date_updated": "2021-01-28T10:45:51Z",
_29
"brand_type": "STANDARD",
_29
"status": "PENDING",
_29
"tcr_id": "BXXXXXX",
_29
"failure_reason": "Registration error",
_29
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85",
_29
"brand_score": 42,
_29
"brand_feedback": [
_29
"TAX_ID",
_29
"NONPROFIT"
_29
],
_29
"identity_status": "VERIFIED",
_29
"russell_3000": true,
_29
"government_entity": false,
_29
"tax_exempt_status": "501c3",
_29
"skip_automatic_sec_vet": false,
_29
"errors": [],
_29
"mock": false,
_29
"links": {
_29
"brand_vettings": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/Vettings",
_29
"brand_registration_otps": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/SmsOtp"
_29
}
_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 vetting

create-a-brandregistration-resource---skip-secondary-vetting 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
import twilio from "twilio";
_16
_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 = twilio(accountSid, authToken);
_16
_16
const brandRegistration = await client.messaging.v1.brandRegistrations.create({
_16
a2PProfileBundleSid: "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
customerProfileBundleSid: "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
skipAutomaticSecVet: true,
_16
});
_16
_16
console.log(brandRegistration.sid);

Output

_29
{
_29
"sid": "BN0044409f7e067e279523808d267e2d85",
_29
"account_sid": "AC78e8e67fc0246521490fb9907fd0c165",
_29
"customer_profile_bundle_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"a2p_profile_bundle_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"date_created": "2021-01-28T10:45:51Z",
_29
"date_updated": "2021-01-28T10:45:51Z",
_29
"brand_type": "STANDARD",
_29
"status": "PENDING",
_29
"tcr_id": "BXXXXXX",
_29
"failure_reason": "Registration error",
_29
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85",
_29
"brand_score": 42,
_29
"brand_feedback": [
_29
"TAX_ID",
_29
"NONPROFIT"
_29
],
_29
"identity_status": "VERIFIED",
_29
"russell_3000": true,
_29
"government_entity": false,
_29
"tax_exempt_status": "501c3",
_29
"skip_automatic_sec_vet": true,
_29
"errors": [],
_29
"mock": false,
_29
"links": {
_29
"brand_vettings": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/Vettings",
_29
"brand_registration_otps": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85/SmsOtp"
_29
}
_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.

Create a new Messaging Service

create-a-new-messaging-service 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
import twilio from "twilio";
_16
_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 = twilio(accountSid, authToken);
_16
_16
const service = await client.messaging.v1.services.create({
_16
fallbackUrl: "https://www.example.com/fallback",
_16
friendlyName: "Acme, Inc.'s A2P 10DLC Messaging Service",
_16
inboundRequestUrl: "https://www.example.com/inbound-messages-webhook",
_16
});
_16
_16
console.log(service.sid);

Output

_34
{
_34
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_34
"sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_34
"date_created": "2015-07-30T20:12:31Z",
_34
"date_updated": "2015-07-30T20:12:33Z",
_34
"friendly_name": "Acme, Inc.'s A2P 10DLC Messaging Service",
_34
"inbound_request_url": "https://www.example.com/inbound-messages-webhook",
_34
"inbound_method": "POST",
_34
"fallback_url": "https://www.example.com/fallback",
_34
"fallback_method": "GET",
_34
"status_callback": "https://www.example.com",
_34
"sticky_sender": true,
_34
"smart_encoding": false,
_34
"mms_converter": true,
_34
"fallback_to_long_code": true,
_34
"scan_message_content": "inherit",
_34
"area_code_geomatch": true,
_34
"validity_period": 600,
_34
"synchronous_validation": true,
_34
"usecase": "marketing",
_34
"us_app_to_person_registered": false,
_34
"use_inbound_webhook_on_number": true,
_34
"sending_windows": [],
_34
"links": {
_34
"phone_numbers": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers",
_34
"short_codes": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ShortCodes",
_34
"alpha_senders": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AlphaSenders",
_34
"messages": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages",
_34
"us_app_to_person": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p",
_34
"us_app_to_person_usecases": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/Usecases",
_34
"channel_senders": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelSenders"
_34
},
_34
"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.

Fetch possible A2P Campaign Use cases

fetch-possible-a2p-campaign-use-cases 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
import twilio from "twilio";
_16
_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 = twilio(accountSid, authToken);
_16
_16
const usAppToPersonUsecase = await client.messaging.v1
_16
.services("MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_16
.usAppToPersonUsecases.fetch({
_16
brandRegistrationSid: "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
});
_16
_16
console.log(usAppToPersonUsecase.usAppToPersonUsecases);

Output

_124
{
_124
"us_app_to_person_usecases": [
_124
{
_124
"code": "2FA",
_124
"name": "Two-Factor authentication (2FA)",
_124
"description": "Two-Factor authentication, one-time use password, password reset",
_124
"post_approval_required": false
_124
},
_124
{
_124
"code": "ACCOUNT_NOTIFICATION",
_124
"name": "Account Notification",
_124
"description": "All reminders, alerts, and notifications. (Examples include: flight delayed, hotel booked, appointment reminders.)",
_124
"post_approval_required": false
_124
},
_124
{
_124
"code": "AGENTS_FRANCHISES",
_124
"name": "Agents and Franchises",
_124
"description": "For brands that have multiple agents, franchises or offices in the same brand vertical, but require individual localised numbers per agent/location/office.",
_124
"post_approval_required": true
_124
},
_124
{
_124
"code": "CHARITY",
_124
"name": "Charity",
_124
"description": "Includes: 5013C Charity\nDoes not include: Religious organizations",
_124
"post_approval_required": false
_124
},
_124
{
_124
"code": "PROXY",
_124
"name": "Proxy",
_124
"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.)",
_124
"post_approval_required": true
_124
},
_124
{
_124
"code": "CUSTOMER_CARE",
_124
"name": "Customer Care",
_124
"description": "All customer care messaging, including account management and support",
_124
"post_approval_required": false
_124
},
_124
{
_124
"code": "DELIVERY_NOTIFICATION",
_124
"name": "Delivery Notification",
_124
"description": "Information about the status of the delivery of a product or service",
_124
"post_approval_required": false
_124
},
_124
{
_124
"code": "EMERGENCY",
_124
"name": "Emergency",
_124
"description": "Notification services designed to support public safety / health during natural disasters, armed conflicts, pandemics and other national or regional emergencies",
_124
"post_approval_required": true
_124
},
_124
{
_124
"code": "FRAUD_ALERT",
_124
"name": "Fraud Alert Messaging",
_124
"description": "Fraud alert notification",
_124
"post_approval_required": false
_124
},
_124
{
_124
"code": "HIGHER_EDUCATION",
_124
"name": "Higher Education",
_124
"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",
_124
"post_approval_required": false
_124
},
_124
{
_124
"code": "K12_EDUCATION",
_124
"name": "K-12 Education",
_124
"description": "Campaigns created for messaging platforms that support schools from grades K-12 and distance learning centers. This is not for Post-Secondary schools.",
_124
"post_approval_required": true
_124
},
_124
{
_124
"code": "LOW_VOLUME",
_124
"name": "Low Volume Mixed",
_124
"description": "Low throughput, any combination of use-cases. Examples include: test, demo accounts",
_124
"post_approval_required": false
_124
},
_124
{
_124
"code": "MARKETING",
_124
"name": "Marketing",
_124
"description": "Any communication with marketing and/or promotional content",
_124
"post_approval_required": false
_124
},
_124
{
_124
"code": "MIXED",
_124
"name": "Mixed",
_124
"description": "Mixed messaging reserved for specific consumer service industry",
_124
"post_approval_required": false
_124
},
_124
{
_124
"code": "POLITICAL",
_124
"name": "Political",
_124
"description": "Part of organized effort to influence decision making of specific group. All campaigns to be verified",
_124
"post_approval_required": false
_124
},
_124
{
_124
"code": "POLLING_VOTING",
_124
"name": "Polling and voting",
_124
"description": "Polling and voting",
_124
"post_approval_required": false
_124
},
_124
{
_124
"code": "PUBLIC_SERVICE_ANNOUNCEMENT",
_124
"name": "Public Service Announcement",
_124
"description": "An informational message that is meant to raise the audience awareness about an important issue",
_124
"post_approval_required": false
_124
},
_124
{
_124
"code": "SECURITY_ALERT",
_124
"name": "Security Alert",
_124
"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",
_124
"post_approval_required": false
_124
},
_124
{
_124
"code": "SOCIAL",
_124
"name": "Social",
_124
"description": "Communication within or between closed communities (For example: influencers alerts)",
_124
"post_approval_required": true
_124
},
_124
{
_124
"code": "SWEEPSTAKE",
_124
"name": "Sweepstake",
_124
"description": "Sweepstake",
_124
"post_approval_required": true
_124
}
_124
]
_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

This step creates the UsAppToPerson resource. When you create this resource, you provide details about your customer's Campaign, such as how message recipients opt in and out, ask for help, and what the messages typically contain.

(warning)

Warning

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

The example below shows a sample request for businesses that are using Twilio's default opt-out behavior(link takes you to an external page) or Advanced Opt-out feature(link takes you to an external page).

Businesses managing their own opt-out, opt-in, and help keywords need to provide additional information when registering a Campaign. Check out the UsAppToPerson resource doc for an example.

For more details on the format and contents of each parameter, visit the A2P 10DLC - Gather Business Information page.

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

_23
// Download the helper library from https://www.twilio.com/docs/node/install
_23
import twilio from "twilio";
_23
_23
// Find your Account SID and Auth Token at twilio.com/console
_23
// and set the environment variables. See http://twil.io/secure
_23
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_23
const authToken = process.env.TWILIO_AUTH_TOKEN;
_23
const client = twilio(accountSid, authToken);
_23
_23
const usAppToPerson = await client.messaging.v1
_23
.services("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_23
.usAppToPerson.create({
_23
brandRegistrationSid: "BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_23
description: "Send marketing messages about sales and offers",
_23
hasEmbeddedLinks: true,
_23
hasEmbeddedPhone: true,
_23
messageFlow:
_23
"End users opt in by visiting www.example.com, creating a new user account, consenting to receive marketing messages via text, and providing a valid mobile phone number.",
_23
messageSamples: ["Message Sample 1", "Message Sample 2"],
_23
usAppToPersonUsecase: "MARKETING",
_23
});
_23
_23
console.log(usAppToPerson.sid);

Output

_53
{
_53
"sid": "QE2c6890da8086d771620e9b13fadeba0b",
_53
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_53
"brand_registration_sid": "BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_53
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_53
"description": "Send marketing messages about sales and offers",
_53
"message_samples": [
_53
"EXPRESS: Denim Days Event is ON",
_53
"LAST CHANCE: Book your next flight for just 1 (ONE) EUR"
_53
],
_53
"us_app_to_person_usecase": "MARKETING",
_53
"has_embedded_links": true,
_53
"has_embedded_phone": true,
_53
"subscriber_opt_in": true,
_53
"age_gated": false,
_53
"direct_lending": false,
_53
"campaign_status": "PENDING",
_53
"campaign_id": "CFOOBAR",
_53
"is_externally_registered": false,
_53
"rate_limits": {
_53
"att": {
_53
"mps": 600,
_53
"msg_class": "A"
_53
},
_53
"tmobile": {
_53
"brand_tier": "TOP"
_53
}
_53
},
_53
"message_flow": "End users opt in by visiting www.example.com, creating a new user account, consenting to receive marketing messages via text, and providing a valid mobile phone number.",
_53
"opt_in_message": "Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP",
_53
"opt_out_message": "You have successfully been unsubscribed. You will not receive any more messages from this number. Reply START to resubscribe.",
_53
"help_message": "Reply STOP to unsubscribe. Msg&Data Rates May Apply.",
_53
"opt_in_keywords": [
_53
"START"
_53
],
_53
"opt_out_keywords": [
_53
"STOP",
_53
"STOPALL",
_53
"UNSUBSCRIBE",
_53
"CANCEL",
_53
"END",
_53
"QUIT"
_53
],
_53
"help_keywords": [
_53
"HELP",
_53
"INFO"
_53
],
_53
"date_created": "2021-02-18T14:48:52Z",
_53
"date_updated": "2021-02-18T14:48:52Z",
_53
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b",
_53
"mock": false,
_53
"errors": []
_53
}

(information)

Info

You can create up to five Campaigns per Brand, unless a clear and valid business reason is provided for exceeding this limit.


6. Add a phone number to the A2P 10DLC Messaging Service

6-add-a-phone-number-to-the-a2p-10dlc-messaging-service page anchor

Before your customer can begin sending A2P 10DLC messages, a 10DLC number must be added to the Messaging Service. Read the Messaging Service PhoneNumber resource doc for more information.


Fetch a Campaign - Use this API request to check a Campaign's registration status.

Subscribe to a Campaign's status using Event Streams - Set up your own endpoint and subscribe to Brand, Campaign, and 10DLC Phone Number status updates from Twilio.

Delete a UsAppToPerson resource - This API request deletes a Campaign and removes it from a Messaging Service.

Troubleshooting A2P 10DLC Registrations - Learn how to understand registration failures and how to fix them.

A2P 10DLC Campaign Approval Best Practices(link takes you to an external page) - Ensure your Campaigns meet all requirements.

Trust Hub API Docs - Read the API documentation for CustomerProfiles, EndUsers, TrustProducts, and SupportingDocuments.


Rate this page: