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

Create Mock US A2P 10DLC Brands and Campaigns


(information)

Info

New to US A2P 10DLC? Please see "What is A2P 10DLC?" (support article)(link takes you to an external page) for more information.

This guide shows you how to create a mock US A2P 10DLC Brand and Campaign that you can use to test and develop applications with. While the creation process of mock and real Brands and Campaigns is similar, there are some key differences to keep in mind:

  • There are no A2P 10DLC fees from The Campaign Registry (TCR) or billing events for creating mock Brands and Campaigns because there is no vetting or validation of the submitted data.
  • Mock Campaigns are not functional and cannot be used to send SMS traffic.
  • Mock Sole Proprietor Brands cannot have mock Campaigns created for them and a one-time password (OTP) email will not be sent during mock Brand creation.

Before you begin

before-you-begin page anchor

Before you can create a mock Brand and Campaign, you'll need to create a real Customer Profile as an ISV-type customer.

First, determine if you'll want to register a mock Standard, Low Volume Standard, or Sole Proprietor Brand with your Customer Profile. If you're not sure which Brand type to choose, check out this Support article(link takes you to an external page) for a detailed look at the differences. Note that mock Sole Proprietor Brands cannot have mock Campaigns created for them, because the OTP (one time password) will not be sent to the designated contact during Brand creation.

  • For a mock Standard or Low Volume Standard Brand:
  • For a mock Sole Proprietor Brand:
    • Complete all steps before 3. Create a new Sole Proprietor A2P Brand in this API walkthrough , then proceed to Step 1.

Step 1. Create a mock Brand

step-1-create-a-mock-brand page anchor

Now that your Customer Profile is set up and linked to an A2P Messaging Profile, you can create a mock Brand.

The process for creating a mock Brand is almost identical to creating a real Brand. The key difference is that you'll need to set the mock request body parameter to True when making the POST request to the Messaging API BrandRegistration Resource. If mock is not specified or set to False, a real Brand will be created.

  • For a mock Standard or Low Volume Standard Brand:
    • Reference step 3. Create an A2P Brand in this API walkthrough for constructing your API request, and set mock to True .
  • For a mock Sole Proprietor Brand:
    • Reference step 3. Create a new Sole Proprietor A2P Brand in this API walkthrough for constructing your API request, and set mock to True .
ParameterValid ValuesDescription
mockTrue, FalseWill create a mock Brand if set to True or a real Brand if either set to False or not specified.

Create a mock Standard Brand

create-a-mock-standard-brand 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
// 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 = require('twilio')(accountSid, authToken);
_15
_15
client.messaging.v1.brandRegistrations
_15
.create({
_15
brandType: 'STANDARD',
_15
mock: true,
_15
customerProfileBundleSid: 'BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX0',
_15
a2PProfileBundleSid: 'BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1'
_15
})
_15
.then(brand_registration => console.log(brand_registration.sid));

Output

_29
{
_29
"sid": "BN0044409f7e067e279523808d267e2d85",
_29
"account_sid": "AC78e8e67fc0246521490fb9907fd0c165",
_29
"customer_profile_bundle_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX0",
_29
"a2p_profile_bundle_sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1",
_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": true,
_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
}

You can confirm that the new Brand you created is a mock by checking for "mock": true in the response. Real (non-mock) Brands will incur A2P 10DLC fees and billing events where applicable(link takes you to an external page).

If you created a mock Sole Proprietor Brand, you will not be able to create mock Campaigns and can skip the remaining steps.


Step 2. Create a Messaging Service

step-2-create-a-messaging-service page anchor
(error)

Danger

We highly discourage the use of existing Messaging Services with Senders in the Sender Pool to avoid any risks of your US messages failing.

Now you will need a Messaging Service to associate with the mock Campaign you are about to create. We recommend creating a new Messaging Service without any Senders. To do that, follow step 4.1 Create a new Messaging Service in this API walkthrough.


Step 3. Create a mock Campaign

step-3-create-a-mock-campaign page anchor

Now that you've created a mock Brand and Messaging Service, you can create an associated mock Campaign. A Campaign represents a single messaging use case or the intent of the messages you wish to send. For example, your Campaign's use case might be to send marketing or account notifications.

The process for creating a mock Campaign is identical to creating a real Campaign. Any Campaign that is associated with a mock Brand automatically becomes a mock Campaign, so there is no need to pass in a mock request parameter during Campaign creation.

Reference step 5. Create an A2P Campaign in this API walkthrough when constructing your API request.

Create a mock Standard Campaign

create-a-mock-standard-campaign 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
// 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 = require('twilio')(accountSid, authToken);
_19
_19
client.messaging.v1.services('MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_19
.usAppToPerson
_19
.create({
_19
brandRegistrationSid: 'BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
_19
description: 'Send marketing messages about sales and offers',
_19
messageSamples: ['Twilio draw the OWL event is ON'],
_19
usAppToPersonUsecase: 'STANDARD',
_19
messageFlow: 'message_flow',
_19
hasEmbeddedLinks: true,
_19
hasEmbeddedPhone: true
_19
})
_19
.then(us_app_to_person => console.log(us_app_to_person.sid));

Output

_46
{
_46
"sid": "QE2c6890da8086d771620e9b13fadeba0b",
_46
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_46
"brand_registration_sid": "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_46
"messaging_service_sid": "MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_46
"description": "Send marketing messages about sales and offers",
_46
"message_samples": [
_46
"Twilio draw the OWL event is ON"
_46
],
_46
"us_app_to_person_usecase": "STANDARD",
_46
"has_embedded_links": true,
_46
"has_embedded_phone": false,
_46
"subscriber_opt_in": false,
_46
"age_gated": false,
_46
"direct_lending": false,
_46
"campaign_status": "PENDING",
_46
"campaign_id": "CFOOBAR",
_46
"is_externally_registered": false,
_46
"rate_limits": {
_46
"att": {
_46
"mps": 600,
_46
"msg_class": "A"
_46
},
_46
"tmobile": {
_46
"brand_tier": "TOP"
_46
}
_46
},
_46
"message_flow": "End users opt-in by visiting www.example.com and adding their phone number. They then check a box agreeing to receive text messages from Example Brand. Additionally, end users can also opt-in by texting START to (111) 222-3333 to opt in.",
_46
"opt_in_message": "Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP",
_46
"opt_out_message": "You have successfully been unsubscribed from Acme Corporation. You will not receive any more messages from this number.",
_46
"help_message": "Acme Corporation: Please visit www.example.com to get support. To opt-out, reply STOP.",
_46
"opt_in_keywords": [
_46
"START"
_46
],
_46
"opt_out_keywords": [
_46
"STOP"
_46
],
_46
"help_keywords": [
_46
"HELP"
_46
],
_46
"date_created": "2021-02-18T14:48:52Z",
_46
"date_updated": "2021-02-18T14:48:52Z",
_46
"url": "https://messaging.twilio.com/v1/Services/MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b",
_46
"mock": false,
_46
"errors": []
_46
}

You can confirm that the new Campaign you created is a mock by checking for "mock": true in the response.


Mock Brands cannot be manually deleted. They will expire and be automatically deleted 30 days after initial creation, along with all mock Campaigns associated with them.

Mock Campaigns can be deleted using the Messaging API with the US A2P identifier QE2c6890da8086d771620e9b13fadeba0b as seen in the example below. This request will remove the mock Campaign associated with the specified Messaging Service.

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

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.messaging.v1.services('MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.usAppToPerson('QE2c6890da8086d771620e9b13fadeba0b')
_10
.remove();

Get help with A2P 10DLC

Need help building or registering your A2P 10DLC application? Learn more about Twilio Professional Services for A2P 10DLC.

Get help(link takes you to an external page)

Rate this page: