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.

Sample messages · 2–5, exactly what recipients receive

Installation

npx shadcn@latest add @handset/campaign-registration-form

Needs 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

Props
PropTypeDefaultDescription
tenantIdstring—The tenant this campaign belongs to (tnt_…). Required.
brandIdstring—The vetted brand to attach (brd_…). Required.
onRegistered(campaign: Campaign) => void—Called with the created campaign on success.
classNamestring—Merged onto the form.