MuxForms on Vercel works via embed.js on marketing pages or POST from a Server Action with the ingest secret. Allow https://your-app.vercel.app and production domains on the form for browser embeds.
Docs
Vercel excels at shipping frontends—MuxForms keeps form ingest out of your serverless budget unless you want a Server Action proxy.
| Pattern | Use when |
|---|---|
| embed.js | Marketing site, no API route |
| Server Action | Custom UI, secret on server |
| /docs/nextjs | App Router details |
| Preview URLs | Add to allowlist for QA |
// app/contact/page.tsx
export default function ContactPage() {
return (
<main>
<h1>Contact</h1>
<div data-form-id="FORM_UUID" />
<script src="https://www.muxforms.com/embed.js" defer />
</main>
);
}"use server";
export async function contactAction(data: { email: string; message: string }) {
const res = await fetch("https://www.muxforms.com/api/v1/forms/FORM_UUID/submit", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.MUXFORMS_INGEST_SECRET}`,
},
body: JSON.stringify({ ...data, _hp: "" }),
});
if (!res.ok) throw new Error("Submit failed");
}Related: Next.js integration.
Allow preview origins once; ship forms with every Vercel project.
Upgrade to Pro