Docs / Vite

A contact form backend for Vite sites

A Vite build is static files — there is nowhere for form submissions to go. conForm is the backend: create one endpoint, drop the form into index.html (or any page), ship the build anywhere. Nothing to configure in vite.config, no plugin, no environment variables, no secrets in the bundle.

1 — Create the endpoint

curl https://api.conform.centrst.com/v1/routes \
  -H 'Content-Type: application/json' \
  -d '{"email":"[email protected]","alias":"Contact"}'

2 — Add the form to your page

Vite sites use the js artifact — the accessible HTML form plus a small fetch enhancement:

curl 'https://api.conform.centrst.com/v1/routes/YOUR_FORM_ID/install?framework=js&raw=1'

Paste it into your page markup. Using React, Vue, or Svelte inside Vite? Use the matching component recipe instead: React, Vue, Svelte.

3 — Verify and prove

The destination inbox confirms one verification email. Then send a marked test — it delivers with a [Test] subject and the response returns test: true:

curl -sS -X POST https://api.conform.centrst.com/f/cfm_7K4P9X2M8RWD3JNH \
  -d 'name=Test&[email protected]&message=Hello from a test&_test=true'
The endpoint is public by design — it is rate-limited, honeypot-protected, and delivers only to the verified inbox. There is no API key that could leak from a static bundle.