Direct Standard Flow
Direct Standard Flow
For businesses with a Tax ID (EIN, CBN, etc.) registering their own brand.
Overview
Steps: 3
Timeline: Profile review (up to 72hrs) → Brand review (minutes to 7+ days) → Campaign vetting (10-15 days)
Prerequisites: None (you create your own Primary Customer Profile)
Who This Is For
- Businesses with an EIN (US), CBN (Canada), or other Tax ID
- Registering your own brand (not on behalf of customers — use ISV flows for that)
- Outside US/Canada with formal business registration
Prerequisites
Before using the SDK, create a Primary Customer Profile via the Twilio Console and wait for it to be approved (up to 72 hours).
Step-by-Step
Step 1: Create Customer Profile
Creates a Standard Customer Profile with business information and authorized representative.
import { flows } from '@warp-message/a2p-sdk';
const step1 = await flows.directStandard.step1_createCustomerProfile(client, {
email: 'compliance@example.com',
businessName: 'Example Corp',
businessAttributes: {
business_name: 'Example Corp', // Must match IRS/tax records exactly
business_type: 'Corporation',
business_industry: 'TECHNOLOGY',
business_registration_identifier: 'EIN',
business_registration_number: '12-3456789',
website_url: 'https://example.com',
business_identity: 'direct_customer',
business_regions_of_operation: 'USA_AND_CANADA',
},
authorizedRep: {
first_name: 'Jane',
last_name: 'Doe',
phone_number: '+15555551234',
email: 'jane@example.com',
job_position: 'CEO',
business_title: 'Chief Executive Officer',
},
address: {
city: 'San Francisco',
customerName: 'Example Corp',
isoCountry: 'US',
postalCode: '94102',
region: 'CA',
street: '123 Main St',
},
statusCallback: 'https://example.com/webhooks/a2p', // Optional
});What happens: Customer Profile submitted for Twilio review (up to 72 hours).
Errors: ProfileRejectedError if profile is rejected.
Step 2: Register Brand
Creates Trust Product and Brand Registration. Since Oct 2024, brand_contact_email is required for 2FA verification.
const step2 = await flows.directStandard.step2_registerBrand(client, {
businessName: 'Example Corp',
email: 'compliance@example.com',
customerProfileSid: step1.state.customerProfileSid!,
brandContactEmail: 'support@example.com', // Required since Oct 2024
a2pMessagingProfile: {
company_type: 'private', // or 'public', 'non_profit', 'government'
stock_exchange: 'NONE', // or NYSE, NASDAQ, etc. for public companies
stock_ticker: undefined, // Required if public
},
statusCallback: 'https://example.com/webhooks/a2p',
});What happens: Trust Product and Brand submitted for The Campaign Registry review (minutes to 7+ business days).
Errors:
TrustProductFailedErrorif Trust Product failsBrandFailedErrorif Brand registration failsBrandSuspendedErrorif Brand is suspended
Step 3: Create Campaign
Creates Messaging Service and Campaign. Can add multiple phone numbers.
const step3 = await flows.directStandard.step3_createCampaign(client, {
brandRegistrationSid: step2.state.brandSid!,
messagingServiceName: 'Example Notifications',
campaign: {
description: 'Order confirmations, shipping updates, and account notifications',
messageFlow: 'Users receive messages after purchase or account changes',
messageSamples: [
'Your order #12345 has shipped!',
'Your password was changed.',
],
usAppToPersonUsecase: 'ACCOUNT_NOTIFICATION',
hasEmbeddedLinks: true,
hasEmbeddedPhone: false,
},
phoneNumberSids: ['+15555556789'], // Optional: 0 or more phone numbers
});What happens: Campaign submitted for manual vetting (10-15 business days).
Errors: CampaignFailedError if campaign fails (can resubmit for additional $15 fee).
Gotchas
- Business name must match IRS/tax records —
business_namein Step 1 must match exactly or brand registration will fail brand_contact_emailis required — Added Oct 2024 for 2FA verification- Primary Profile must exist — SDK checks for an approved Primary Profile in Step 1 and throws if missing
- Multiple phone numbers supported — Unlike Sole Prop, you can add 0-N phone numbers