Scheduled composer
Compose and send now, or flip 'Send later' to pick a date and time. Scheduling POSTs send_at to the API, which parks the message in scheduled status until it's due — a real server-side schedule, not a browser timer.
Installation
npx shadcn@latest add @handset/scheduled-composerUsage
import { ScheduledComposer } from "@/components/handset/scheduled-composer";
<ScheduledComposer
fromNumberId={tenant.numberId}
to={contact.phone}
onSent={(m) => m.status === "scheduled" ? toast("Scheduled") : toast("Sent")}
/>Sends immediately by default; the send_at is only added when “Send later” is on. The API accepts a schedule up to 90 days out and returns the message in scheduled status with scheduled_at set. Every send carries an Idempotency-Key. Pair it with quiet-hours if you also want to block ill-timed immediate sends.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| fromNumberId | string | — | The tenant number to send from (num_…). |
| to | string | — | Recipient in E.164. |
| onSent | (message) => void | — | Called with the sent or scheduled message. |
| className | string | — | Merged onto the root card. |