New to US A2P 10DLC registration? Please see "What is A2P 10DLC?" (support article) for more information.
The US App to Person (A2P) 10DLC Mock Brand and Campaign API allows you to develop and test applications against Twilio’s A2P Brand and Campaign APIs without incurring any A2P 10DLC related fees. Mock brands and mock campaigns are created similarly to brands and campaigns registered against the non-mock A2P APIs; however, there are some important restrictions and considerations to keep in mind when you’re using this API.
This guide will cover:
- The prerequisites needed to get started with the Mock Brand API.
- Creating mock brands.
- Creating mock A2P SMS campaign use cases.
- Deleting mock A2P SMS campaign use cases.
- Important considerations for mock brands and mock campaigns.
Before you can start testing against the Mock Brand API you will need to create a real (non-mock) customer profile and complete all steps before Step 3, "Create an A2P Brand" in one of the two Independent Software Vendor (ISV) API walkthroughs. Mock brands can be created as either brand type (Standard or Starter), so follow the API walkthrough that best suits your use case based on your customer's anticipated messaging volume:
For the registration process for a Standard brand, see the ISV Standard API walkthrough.
For the registration process for a Starter brand, see the ISV Starter API walkthrough.
For this guide, we’ll be following the brand and campaign creation flow for a Starter Brand, but the same steps will apply to Standard brand creation too. You can follow along with the ISV Standard API walkthrough to create a mock Standard Brand instead if you choose.
Not sure which brand type you should register your customers for? Head over to the ISV Starter Overview guide for a detailed look at the differences between the two brand types.
After successfully creating a Customer Profile and linking it to an A2P messaging profile, you’re ready to create a mock brand. To do so, you will make a POST request to the Brand Registrations API and pass the
mock parameter set to
True in the request body. Mock brand creation occurs during Step 3, "Create an A2P Brand" of the ISV Starter walkthrough (as well as the Standard walkthrough).
|Will default to
Note the response for this request. You will see the
mock parameter with the boolean value
true upon successful creation of a mock brand. If you don’t pass
mock your brand will be created as a real (non-mock) brand, incurring A2P 10DLC fees and billing events where applicable.
Please Note: We highly discourage the use of existing Messaging Services with Senders in the Sender Pool to avoid any risks of your US messages failing.
We encourage the creation of a new Messaging Service without any Senders to test the creation of Mock Campaigns.
Prior to creating a mock campaign, you will need a Messaging Service to associate with the mock campaign. To do that, please see Step 4 "Create a Messaging Service" in the ISV Starter API walkthrough.
Once you’ve created your mock brand and a Messaging Service, you can create associated mock A2P SMS campaign use cases. An A2P SMS campaign use case represents a messaging use case or the intent of the messages you wish to send (for example: marketing or account notifications).
Mock campaigns can only be created from mock brands, and they inherit the
mock parameter from that mock brand.
In the response for this request you will see the
mock parameter with the boolean value
true indicating that this campaign was created from a mock brand, making it a mock campaign.
Please note that you must pass
True for the mock attribute when creating your mock brand in order to create a mock campaign use case.
Once you are finished testing your mock campaign, you can delete it from your Messaging Service with the US A2P Compliance resource identifier
QE2c6890da8086d771620e9b13fadeba0b. You can then add a new campaign with a non-mock brand to start sending A2P messaging traffic from the Messsaging Service.
It’s important to note that the Mock Brand API is strictly for development purposes and the mock brands and campaigns you create are not functional for sending live A2P traffic. Below are some important considerations to keep in mind as you work with this API:
- Mock Brands and campaigns expire after 30 days. After the 30 day period, your mock brand will become invalid and expire.
- You cannot delete a mock brand. You must wait until the mock brand expires. Mock Campaigns can be deleted as described above.
- There are no billing events from mock brand or mock campaign creation.