API Reference
A2PClient
A2PClient
The A2PClient class wraps the Twilio SDK and provides typed methods for all A2P 10DLC registration operations.
Constructor
import { A2PClient } from '@warp-message/a2p-sdk';
const client = new A2PClient({
accountSid: 'AC...',
authToken: '...',
});Static Methods
fromTwilioClient
Create an A2PClient from an existing Twilio client instance.
import Twilio from 'twilio';
import { A2PClient } from '@warp-message/a2p-sdk';
const twilioClient = Twilio(accountSid, authToken);
const client = A2PClient.fromTwilioClient(twilioClient);Methods
See the client.ts source for the complete method reference.
Customer Profile Methods
createStandardCustomerProfile()— Create a Standard/LVS Customer ProfilecreateBusinessEndUser()— Create Business EndUsercreateAuthorizedRepEndUser()— Create Authorized Rep EndUsercreateAddress()— Create mailing addresscreateAddressSupportingDoc()— Create address supporting documentattachToProfile()— Attach entity to Customer ProfileevaluateProfile()— Evaluate Customer Profile against policysubmitProfile()— Submit Customer Profile for reviewgetProfileStatus()— Fetch Customer Profile statuslistCustomerProfiles()— List all Customer Profiles
Trust Product Methods
createTrustProduct()— Create A2P Trust ProductcreateA2PMessagingProfileEndUser()— Create A2P Messaging Profile EndUserattachToTrustProduct()— Attach entity to Trust ProductevaluateTrustProduct()— Evaluate Trust ProductsubmitTrustProduct()— Submit Trust Product for reviewgetTrustProductStatus()— Fetch Trust Product status
Brand Registration Methods
createBrandRegistration()— Register brand with The Campaign RegistrygetBrandStatus()— Fetch brand statuspollBrandUntil()— Poll brand until target status (default 10min timeout, doesn't throw)
Sole Proprietor Methods
createStarterCustomerProfile()— Create Starter ProfilecreateStarterProfileInfoEndUser()— Create Starter Profile Info EndUsercreateSolePropTrustProduct()— Create Sole Prop Trust ProductcreateSolePropEndUser()— Create Sole Prop EndUser
Campaign Methods
createMessagingService()— Create Messaging ServiceaddPhoneToMessagingService()— Add phone number to sender poolfetchUseCases()— Fetch available use casescreateCampaign()— Register campaigngetCampaignStatus()— Fetch campaign statuspollCampaignUntil()— Poll campaign until target status (default 30min timeout, doesn't throw)
Utility Methods
listEndUsers()— List all EndUser resourceslistBrandRegistrations()— List all Brand Registrations