v0 integration
v0 builds the UI. We're the backend.
v0 generates a beautiful form, but your form doesn't do anything yet — there's no server to receive the data. Point it at one formbuild.io URL and it submits, stores, and notifies. No backend code to write.
Three steps to a working form
Create a form
Sign up and create a form in the dashboard. You get a unique URL: https://formbuild.io/in/YOUR_FORM_ID.
Point your v0 form at it
Set that URL as the form's action, or POST to it from a fetch() call. No backend, API route, or database needed.
Get the responses
Submissions show up in your dashboard instantly and can be forwarded to email, Slack, Discord, and more.
A full, runnable example
Replace YOUR_FORM_ID with the id from your dashboard. The endpoint POST https://formbuild.io/in/YOUR_FORM_ID accepts a plain HTML form submit, urlencoded data, or a JSON object.
<!-- Replace YOUR_FORM_ID with the id from your formbuild.io dashboard. -->
<form action="https://formbuild.io/in/YOUR_FORM_ID" method="POST">
<input type="email" name="email" placeholder="you@example.com" required />
<textarea name="message" placeholder="Your message" required></textarea>
<button type="submit">Send</button>
</form>// Submit a v0 form to formbuild.io as JSON, with error handling.
// The endpoint accepts application/json (a flat object of string values),
// application/x-www-form-urlencoded, and multipart/form-data.
// Note: file uploads are NOT stored — send text fields only.
interface ContactPayload {
email: string;
message: string;
}
async function submitForm(payload: ContactPayload): Promise<void> {
const res = await fetch("https://formbuild.io/in/YOUR_FORM_ID", {
method: "POST",
headers: {
"Content-Type": "application/json",
// Optional: retry-safe. Reuse the same key to avoid duplicate responses.
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify(payload),
});
if (!res.ok) {
// Errors come back as { error: string }.
const { error } = (await res.json().catch(() => ({ error: "Request failed" }))) as {
error?: string;
};
throw new Error(error ?? `Submission failed (${res.status})`);
}
}
// Wire it to your v0 form's onSubmit:
// await submitForm({ email, message });"use client";
import { useState } from "react";
interface ContactPayload {
email: string;
message: string;
}
export function ContactForm() {
const [status, setStatus] = useState<"idle" | "sending" | "done" | "error">("idle");
async function onSubmit(e: React.FormEvent<HTMLFormElement>) {
e.preventDefault();
setStatus("sending");
const form = e.currentTarget;
const payload: ContactPayload = {
email: (form.elements.namedItem("email") as HTMLInputElement).value,
message: (form.elements.namedItem("message") as HTMLTextAreaElement).value,
};
try {
const res = await fetch("https://formbuild.io/in/YOUR_FORM_ID", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
});
if (!res.ok) throw new Error("Submission failed");
setStatus("done");
form.reset();
} catch {
setStatus("error");
}
}
if (status === "done") return <p>Thanks — we got your message.</p>;
return (
<form onSubmit={onSubmit}>
<input name="email" type="email" placeholder="you@example.com" required />
<textarea name="message" placeholder="Your message" required />
<button type="submit" disabled={status === "sending"}>
{status === "sending" ? "Sending…" : "Send"}
</button>
{status === "error" && <p>Something went wrong. Please try again.</p>}
</form>
);
}Paste this prompt into v0
Tell v0 to use formbuild.io as the backend. It injects your form URL so the generated code submits to the right place.
Update the contact form so it actually submits.
Use formbuild.io as the backend. POST the form fields to:
https://formbuild.io/in/YOUR_FORM_ID
Requirements:
- Send the data as JSON with Content-Type: application/json
- The body is a flat object of the form fields (e.g. { email, message })
- Show a success state on a 2xx response, and an error message otherwise
- Do not add any other backend or API route — this URL is the backend
- Do not include file inputs (file uploads are not stored)Frequently asked questions
Why doesn't my v0 form do anything when I submit it?
v0 generates the form UI — the markup and styling — but not a backend to receive the data. With no action URL or submit handler, the browser has nowhere to send the response. formbuild.io is that backend: point the form at the URL we give you and submissions are received, stored, and forwarded to you.
How do I connect a v0 form to formbuild.io?
Create a form in your formbuild.io dashboard to get a unique URL like https://formbuild.io/in/YOUR_FORM_ID. Set that as your form's action (or POST to it from a fetch call). That's the whole integration — no server, no API route, no database setup.
Do I need to write any backend code?
No. The endpoint accepts a standard HTML form POST, urlencoded data, or a JSON object. You only need front-end code, which v0 already wrote. formbuild.io handles receiving, storing, spam filtering, and notifications.
Can it send responses to email, Slack, or Discord?
Yes. Every response lands in your dashboard, and you can forward them to email, Slack, Discord, Microsoft Teams, Telegram, or any webhook (Zapier/Make/n8n). Email and dashboard are on the free plan; the rest are on Pro.
Does it support file uploads from a v0 form?
No. Multipart submissions are accepted, but file parts are dropped — only text fields are stored. Don't rely on formbuild.io to store uploaded files.
Is there a free plan?
Yes. The free plan is ₹0 forever and includes 2 forms and 50 responses per month — enough to ship a v0 site's contact form. Pro is ₹499/month for 20 forms, 2,000 responses, teams, and all the notification integrations.
Make your v0 form work
Create a form, copy the URL, paste it into v0. Free to start — 2 forms and 50 responses a month, no card required.
Start free