Languages and runtimes
Handle contact forms without writing a Node.js server
Most integrations post from the browser, which keeps per-visitor spam signals intact. Sometimes you want the submission to pass through your own server first - to enrich it, to check something against your database, or because the form lives behind authentication. Forwarding from Node is a single fetch call.
Setup
Copy your endpoint
Create a form in the dashboard.
Forward from your route
Do your own checks first, then POST the payload through.
Node.js examples
Swap in your own endpoint and these run as-is.
Express. Native fetch, so no dependency beyond Express itself.
import express from "express";
const app = express();
app.use(express.urlencoded({ extended: true }));
app.use(express.json());
app.post("/contact", async (req, res) => {
// your own validation / enrichment here
const upstream = await fetch("https://send.webforms.to/wft_your_key", {
method: "POST",
headers: {
"content-type": "application/json",
accept: "application/json",
},
body: JSON.stringify({
...req.body,
source: "marketing-site",
}),
});
const data = await upstream.json();
res.status(upstream.ok ? 200 : 400).json(data);
});
app.listen(3000);Worth knowing
- Submissions forwarded from your server carry your server's IP, so IP-based spam heuristics and rate limits see one address for every visitor. Post from the browser unless you specifically need the server in the middle.
Node.js form FAQ
When you need to validate against data only your server has, enrich the payload, or when the form sits behind authentication. Otherwise post from the browser and keep the spam signals.
Related guides
Ready to wire up your Node.js form?
Free for 300 submissions a month. Endpoint in under a minute, no card required.
Start free