Campaign registration form
A 10DLC campaign registration form. Carriers review the use case, the description, 2–5 sample messages, and how recipients opt in — so the form enforces those minimums before POSTing to /campaigns through your proxy.
Installation
npx shadcn@latest add @handset/campaign-registration-formNeeds a vetted brand first — see brand-registration-form — and the proxy's POST /campaigns route.
Usage
import { CampaignRegistrationForm } from "@/components/handset/campaign-registration-form";
<CampaignRegistrationForm
tenantId={tenant.id}
brandId={brand.id}
onRegistered={(campaign) => setCampaignId(campaign.id)}
/>Sample messages are dynamic (add up to five, remove down to two). The API rejects fewer than two samples or an opt-in description under 40 characters, and the form checks both before submitting.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| tenantId | string | — | The tenant this campaign belongs to (tnt_…). Required. |
| brandId | string | — | The vetted brand to attach (brd_…). Required. |
| onRegistered | (campaign: Campaign) => void | — | Called with the created campaign on success. |
| className | string | — | Merged onto the form. |