Telecom & SMSShippedFeatured Project

Twilio A2P 10DLC Hub (80+ campaigns)

Master command center for managing 80+ A2P 10DLC SMS campaigns across five Twilio accounts, with 65+ automation scripts for brand registration, campaign submission, auditing, and compliance

80+
campaigns managed
65+
automation scripts
90%
manual work reduction

Twilio A2P 10DLC Campaign Hub

One-Line Summary: Master command center for managing 80+ A2P 10DLC SMS campaigns across five Twilio accounts, with 65+ automation scripts for brand registration, campaign submission, auditing, and compliance.

--

Problem Statement

a multi-brand US debt-resolution operations firm operates a high-volume outbound SMS operation spanning multiple brands, LLCs, and business entities. Each brand requires its own A2P 10DLC campaign registration through Twilio before it can legally send business-to-consumer text messages in the United States.

The manual process of submitting campaigns through the Twilio console is painfully slow. each submission requires filling out brand details, use case information, sample messages, opt-in flow descriptions, and compliance fields. With 80+ campaigns across five connected Twilio accounts spanning the client's subsidiary brands, manual submission was taking hours per campaign and was error-prone. Carrier rejection codes (30886, 30893, 30897, 30909, etc.) were poorly understood, leading to repeated failed submissions and wasted review cycles that take 1-3 weeks each.

There was no centralized visibility into which brands were registered, which campaigns were pending, which had failed, or what the error patterns were across accounts.

--

Solution

Built a comprehensive campaign management hub consisting of three layers:

1. Automation Scripts (65+ Node.js scripts) A library of purpose-built scripts that interact with the Twilio REST API to automate every phase of the 10DLC lifecycle:

  • Brand Registration: Programmatic brand submission to TCR across all connected accounts
  • Campaign Submission: Programmatic brand-registration and campaign-submission scripts, including batch-submission tooling driven from CSV input and audit utilities for fetching live campaign state. Handles bulk and targeted submissions with validation, rate limiting, and error logging.
  • Deep Auditing: Comprehensive account-wide audits that produce JSON reports of every brand, campaign, messaging service, and phone number across all accounts
  • Account Discovery: Scripts that enumerate all connected subaccounts, their statuses, and resource counts
  • Campaign Inspection: Scripts that pull detailed campaign and brand data for analysis
  • Service Management: Twilio Messaging Service creation and configuration
  • Flag Debugging: Investigation of campaign flag issues and content filtering
  • Rollback & Fix: Undo failed submissions and correct campaign metadata
  • Status Checking: Automated status polling with JSON result files for tracking progression from PENDING to IN_PROGRESS to VERIFIED or FAILED

2. Submission Methodology Developed a proven "v5 recipe" approach for campaign submissions after iterating through dozens of failed attempts:

  • Quote exact checkbox consent text from the brand's website in the MessageFlow field
  • Provide 5 sample messages with personalization tokens and STOP language
  • Frame descriptions as operational (not financial/lending)
  • Use AGENTS_FRANCHISES use case for multi-brand setups
  • Set DirectLending=false, HasEmbeddedLinks=true, HasEmbeddedPhone=true
  • Single-channel opt-in only (web form, no SMS keyword opt-in)
  • Include the required privacy carve-out line about not sharing mobile information

3. Documentation & Guides

  • Campaign automation plan with phase-by-phase build instructions
  • CSV template guide with column definitions, valid use cases, and per-use-case examples
  • Troubleshooting guide mapping every Twilio error code to root cause and fix
  • Quick-start guide for getting new team members up and running in 5 minutes
  • Master tracker spreadsheet with brand profiles, scores, submission statuses, and account credentials

--

Tech Stack

ComponentTechnology
RuntimeNode.js
API ClientTwilio Node.js SDK (twilio npm package)
Configurationdotenv for credential management
Data Inputcsv-parser for bulk campaign CSV ingestion
OutputJSON result files, structured audit reports
Accounts5 connected Twilio accounts with multi-subaccount management

--

Key Features

  • Bulk Campaign Submission: Load campaigns from CSV, validate all fields, submit via API with 1-request-per-second rate limiting, and output structured result files
  • Multi-Account Management: Scripts dynamically target any of the 5 connected Twilio accounts by swapping credentials
  • Deep Audit Reports: Single-command audit that discovers every brand registration, campaign, messaging service, phone number, and their statuses across an entire account hierarchy
  • Carrier Rejection Code Database: Comprehensive mapping of error codes 30882-30909 to root causes, with actionable fix instructions and resubmission strategies
  • Campaign Flag Debugging: Scripts that inspect campaign content flags (embedded links, phone numbers, direct lending) to identify why carriers are rejecting
  • Rollback Capability: Programmatic rollback of failed submissions to clean up orphaned campaigns
  • Account Suspension Recovery: Managed recovery process after account-level suspensions, including documentation for the IT team
  • Submission Result Tracking: Every submission produces a timestamped JSON file with success/failure per campaign, error codes, and SIDs for future reference

--

Impact / Metrics

Cut campaign submission time from ~30 minutes per campaign to ~2 minutes through batch tooling and a documented v5 recipe. Applied across 80+ campaigns spanning 5 Twilio accounts, that is the difference between roughly 40 hours and 3 hours per full portfolio refresh.

MetricValue
Campaigns Managed80+ across 5 Twilio accounts
Automation Scripts65+ purpose-built Node.js scripts
Manual Work Reduction~90% reduction in per-campaign submission time
Brands Tracked30+ brand registrations across entities
Error Codes Documented15+ carrier rejection codes with proven fixes
Submission TimeReduced from ~30 min/campaign (manual) to ~2 min/campaign (automated)
Batch CapabilitySubmit 10+ campaigns in a single automated run

--

Status

Active. Ongoing Operations. Campaigns are continuously being submitted, monitored, and resubmitted as needed. The v5 submission recipe is the current proven approach. 12 campaigns have permanently failed on Twilio and are being migrated to alternative carriers (Telnyx, Kaleyra). Remaining campaigns cycle through IN_PROGRESS status with 1-3 week DCA review windows.

Node.jsTwilio SDKJavaScriptCSVJSON

More in this category