send.webforms.toRead the docs →

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.

Get an endpointRead the docs

Setup

  1. Copy your endpoint

    Create a form in the dashboard.

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

server.js
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

Node.js form FAQ

Post from the browser when you can: it is one less hop and the request already carries the submitter's IP and user agent, which help spam scoring. Forward server-side when you need to add fields the client must not control, and send the original IP in the payload so scoring stays accurate.

Where Node.js submissions can go

The guide above gets the submission to your endpoint. From there it can land anywhere: one destination on Free, several on Pro.

Need the form markup too? The template gallery has complete forms for contact, waitlist, job application and more, and the form generator builds one field by field.

Ready to wire up your Node.js form?

Free for 300 submissions a month. Endpoint in under a minute, no card required.

Start free