NAME

Twilio::Rest::Trusthub::V1::A2PCampaignRegistration - The A2PCampaignRegistration resource

SYNOPSIS

my $client = Twilio::Rest::Client->new($account_sid, $auth_token);

my $a2_pcampaign_registration = $client->trusthub->v1->a2p_campaign_registrations->create(\%body);

DESCRIPTION

An A2P Campaign Registration represents a campaign registered with The Campaign Registry (TCR) for 10DLC messaging, linked to an approved A2P Brand. This endpoint creates a new campaign registration and initializes a Persona embeddable compliance session that the ISV's end user completes to submit campaign use-case information.

This file holds A2PCampaignRegistrationList and A2PCampaignRegistrationInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

A2PCampaignRegistrationList

Returned by $client->trusthub->v1->a2p_campaign_registrations. See also Twilio::ListResource.

create

my $a2_pcampaign_registration = $client->trusthub->v1->a2p_campaign_registrations->create(\%body);

Create a new A2P Campaign Registration and initialize an embedded compliance session. Returns a A2PCampaignRegistrationInstance.

%body is sent as JSON. It takes the names Twilio's API documentation uses.

Its fields are:

a2pBrandRegistrationSid

Required. The legacy Twilio A2P Brand SID (BN-prefixed) for the brand this campaign is registered under. This is a different identifier from the id returned by the Initialize Brand endpoint (which is formatted as tri1.us1.account.AC.../registration.BU...). Retrieve the BN brand SID via GET /v1/a2p/BrandRegistrations/{Sid} on messaging.twilio.com. This field keeps the legacy Sid name because it carries a legacy Twilio SID (BN prefix) from messaging.twilio.com.

ageGated

Whether the content is age-gated.

directLending

Whether the campaign involves direct lending.

embeddedUrlSample

A sample URL that will be embedded in messages (must use https://).

Whether messages will contain embedded links.

hasEmbeddedPhone

Whether messages will contain embedded phone numbers.

helpKeywords

Keywords users can text for help.

helpMessageSample

A sample help message.

messagingServiceSid

The SID of the Messaging Service. This field keeps the legacy Sid name because it carries a legacy Twilio SID (MG prefix) from messaging.twilio.com.

optInKeywords

Keywords users can text to opt in.

optInMessageSample

A sample opt-in confirmation message.

optOutKeywords

Keywords users can text to opt out.

optOutMessageSample

A sample opt-out confirmation message.

privacyPolicyUrl

The URL to the privacy policy.

termsAndConditionsUrl

The URL to the terms and conditions.

themeSetId

Theme ID for styling the inquiry form.

useCaseCategories

The categories of the messaging use case. The value is validated by the service; see the Twilio docs for accepted values.

useCaseDescription

A description of the messaging use case.

useCaseOptInDescription

A description of the opt-in process.

useCaseOptInTypes

The opt-in methods for the use case. The value is validated by the service; see the Twilio docs for accepted values.

useCaseSampleMessage1

A sample message for the use case.

useCaseSampleMessage2

A second sample message for the use case.

useCaseSampleMessage3

A third sample message for the use case.

useCaseSampleMessage4

A fourth sample message for the use case.

useCaseSampleMessage5

A fifth sample message for the use case.

A2PCampaignRegistrationInstance

See also Twilio::InstanceResource.

Its fields are:

id

The unique A2P Brand or Campaign Registration identifier, formatted as tri1.us1.account.AC.../registration.BU....

session_id

The Persona inquiry ID used to start the embedded compliance session.

session_token

The Persona session token for embedding the compliance UI. Expires in 24 hours.

CONSTRUCTORS

new

Objects here come from the methods above, so there is no need to call new directly.

LICENSE

Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.