Skip to content

Contact Forms

Every Boxi-built client site submits to /api/contact which does three things automatically.

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 manager

Steps 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.

Terminal window
# Always required
RESEND_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 only
BOXI_APP_URL=https://app.boximarketing.com
BOXI_WEBHOOK_SECRET= # openssl rand -hex 32 (generate per client)
BOXI_CLIENT_ID= # From Boxi App → Client profile page

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).

  1. Submit the form on the staging URL
  2. Confirm notification email at CLIENT_NOTIFY_EMAIL
  3. Confirm auto-reply at the prospect address used
  4. Open Boxi App → [Client] → Leads → confirm lead appears with source website-contact-form
  5. Confirm Boxi workflow automation fired (check workflow execution log)

When a client takes ownership:

  1. Remove the three BOXI_* vars from Doppler (or hand over the Doppler project)
  2. Form still works — Resend notifies client and sends auto-replies
  3. 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.