Contact Forms
Every Boxi-built client site submits to /api/contact which does three things automatically.
The Canonical 3-Step Flow
Section titled “The Canonical 3-Step Flow”Prospect submits form → POST /api/contact │ ├── 1. Resend → notification email to client owner (CLIENT_NOTIFY_EMAIL) ├── 2. Resend → auto-reply confirmation to prospect └── 3. POST → Boxi App /api/webhooks/lead-capture (fires only if BOXI_* vars set) └── Boxi Workflow Automation ├── Creates lead in pipeline (source: website-contact-form) ├── Triggers email/SMS sequences └── Assigns to account managerSteps 1 and 2 always fire. Step 3 is opt-in — fires only when all three BOXI_* env vars are set in Doppler. The form is naturally portable: remove the Boxi vars and the form still works independently.
Required Secrets (Doppler prd config)
Section titled “Required Secrets (Doppler prd config)”# Always requiredRESEND_API_KEY= # Boxi shared Resend Pro account ($20/mo, all clients)RESEND_FROM_EMAIL= # noreply@clientdomain.com (verified once per client)CLIENT_NOTIFY_EMAIL= # owner@clientbusiness.com
# Full-service clients onlyBOXI_APP_URL=https://app.boximarketing.comBOXI_WEBHOOK_SECRET= # openssl rand -hex 32 (generate per client)BOXI_CLIENT_ID= # From Boxi App → Client profile pageOutput Mode Requirement
Section titled “Output Mode Requirement”output: 'static' sites cannot use this form — static output has no server runtime. All Boxi client sites use output: 'hybrid' (static pages by default, API routes always server-rendered).
Pre-Launch Verification (required)
Section titled “Pre-Launch Verification (required)”- Submit the form on the staging URL
- Confirm notification email at
CLIENT_NOTIFY_EMAIL - Confirm auto-reply at the prospect address used
- Open Boxi App → [Client] → Leads → confirm lead appears with source
website-contact-form - Confirm Boxi workflow automation fired (check workflow execution log)
Client Handover (Portable Mode)
Section titled “Client Handover (Portable Mode)”When a client takes ownership:
- Remove the three
BOXI_*vars from Doppler (or hand over the Doppler project) - Form still works — Resend notifies client and sends auto-replies
- For full portability: transfer Resend API key to the client’s own Resend account
The contact form requires zero Boxi infrastructure when the BOXI_* vars are absent.