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) 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 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 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

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 a BrandRegistration 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

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
const twilio = require("twilio"); // Or, for ESM: 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
async function createBrandRegistrations() {
_23
const brandRegistration = await client.messaging.v1.brandRegistrations.create(
_23
{
_23
a2PProfileBundleSid: "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1",
_23
brandType: "STANDARD",
_23
customerProfileBundleSid: "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX0",
_23
mock: true,
_23
}
_23
);
_23
_23
console.log(brandRegistration.sid);
_23
}
_23
_23
createBrandRegistrations();

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.

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

(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. Create a Messaging Service in this API walkthrough.


Step 3. Create a mock Campaign

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

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
const twilio = require("twilio"); // Or, for ESM: 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
async function createUsAppToPerson() {
_26
const usAppToPerson = await client.messaging.v1
_26
.services("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_26
.usAppToPerson.create({
_26
brandRegistrationSid: "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_26
description: "Send marketing messages about sales and offers",
_26
hasEmbeddedLinks: false,
_26
hasEmbeddedPhone: false,
_26
messageFlow: "MessageFlow",
_26
messageSamples: ["Book your next OWL FLIGHT for just 1 EUR"],
_26
usAppToPersonUsecase: "STANDARD",
_26
});
_26
_26
console.log(usAppToPerson.sid);
_26
}
_26
_26
createUsAppToPerson();

Output

_47
{
_47
"sid": "QE2c6890da8086d771620e9b13fadeba0b",
_47
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_47
"brand_registration_sid": "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_47
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_47
"description": "Send marketing messages about sales and offers",
_47
"message_samples": [
_47
"EXPRESS: Denim Days Event is ON",
_47
"LAST CHANCE: Book your next flight for just 1 (ONE) EUR"
_47
],
_47
"us_app_to_person_usecase": "STANDARD",
_47
"has_embedded_links": false,
_47
"has_embedded_phone": false,
_47
"subscriber_opt_in": false,
_47
"age_gated": false,
_47
"direct_lending": false,
_47
"campaign_status": "PENDING",
_47
"campaign_id": "CFOOBAR",
_47
"is_externally_registered": false,
_47
"rate_limits": {
_47
"att": {
_47
"mps": 600,
_47
"msg_class": "A"
_47
},
_47
"tmobile": {
_47
"brand_tier": "TOP"
_47
}
_47
},
_47
"message_flow": "MessageFlow",
_47
"opt_in_message": "Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP",
_47
"opt_out_message": "You have successfully been unsubscribed from Acme Corporation. You will not receive any more messages from this number.",
_47
"help_message": "Acme Corporation: Please visit www.example.com to get support. To opt-out, reply STOP.",
_47
"opt_in_keywords": [
_47
"START"
_47
],
_47
"opt_out_keywords": [
_47
"STOP"
_47
],
_47
"help_keywords": [
_47
"HELP"
_47
],
_47
"date_created": "2021-02-18T14:48:52Z",
_47
"date_updated": "2021-02-18T14:48:52Z",
_47
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b",
_47
"mock": false,
_47
"errors": []
_47
}

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


Mock deletion

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.

Delete a mock Campaign

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
const twilio = require("twilio"); // Or, for ESM: 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
async function deleteUsAppToPerson() {
_17
await client.messaging.v1
_17
.services("MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_17
.usAppToPerson("QE2c6890da8086d771620e9b13fadeba0b")
_17
.remove();
_17
}
_17
_17
deleteUsAppToPerson();

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

Rate this page: