No API route, no adapter required
A contact form shouldn’t be the reason a static Astro site grows a server. The form POSTs cross-origin to Furrow; your build output stays plain files on any host.
Frameworks & SSGs · works with Furrow Forms
Zero-JS forms for the zero-JS framework — Astro snippets generated natively.
paste this into your agent
Fetch furrowforms.com/ai and set up a contact form backend for my Astro site.agent-readable recipe: /forms-for/astro.md
prefer clicking? start in the dashboard
---
const endpoint = 'https://api.furrowforms.com/s/fp_k7m2';
---
<form action={endpoint} method="POST">
<input type="text" name="_gotcha" style="display:none" tabindex="-1" />
<input type="hidden" name="_ft" value="" />
<script is:inline>document.currentScript.previousElementSibling.value = Date.now();</script>
<input name="name" type="text" required />
<input name="email" type="email" required />
<textarea name="message" required></textarea>
<button>Send</button>
</form>The gap
Astro’s bet is that most of your site doesn’t need JavaScript — and with the right form backend, neither does your contact form. A plain <form> with its action pointed at Furrow Forms works from a fully static Astro build: the visitor POSTs, Furrow filters spam and stores the submission, and the browser follows a redirect to your thank-you page. No island, no hydration, no API route. Furrow generates Astro snippets natively from your form’s field contract, honeypot and Turnstile included — and if you’d rather stay in the terminal, your agent can provision the whole thing over MCP.
A contact form shouldn’t be the reason a static Astro site grows a server. The form POSTs cross-origin to Furrow; your build output stays plain files on any host.
The classic POST works with no client JS at all. Prefer an inline success state? Make the form an island and fetch() the same endpoint — the JSON response is { ok, id }.
get_snippet emits .astro component code directly — field contract, honeypot, and the Turnstile widget when your project requires it. Paste and commit.
Two ways in
Furrow’s whole control plane is an API and MCP server. Paste this prompt into Claude Code, Cursor, or any agent — it does the rest:
paste this into your agent
Fetch furrowforms.com/ai and set up a contact form backend for my Astro site.free tier: 100 subs/mo · unlimited forms · full API + MCP · pricing →
Working setup
A static Astro page does not need an endpoint, an adapter, or a client island. The browser POSTs straight to Furrow. Replace fp_k7m2 with the form’s public key from get_snippet or the dashboard — that key is safe to commit.
A classic POST (no Accept: application/json header) answers with a 303 to the project’s thank-you URL. Set that URL once, as an absolute address on an allowed domain, for example https://example.com/thanks. Create the page in the site; Furrow does not host it.
Add the site’s apex and www to the project’s allowed domains before you test. A missing www is a 403 forbidden_origin. Ports are ignored, so localhost covers a local dev server.
---
const endpoint = 'https://api.furrowforms.com/s/fp_k7m2';
---
<form action={endpoint} method="POST">
<input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off" />
<input type="hidden" name="_ft" value="" />
<script is:inline>
document.currentScript.previousElementSibling.value = Date.now();
</script>
<label>
Name
<input name="name" type="text" required />
</label>
<label>
Email
<input name="email" type="email" required />
</label>
<label>
Message
<textarea name="message" required></textarea>
</label>
<button>Send</button>
</form>Zero client JavaScript. The tiny inline script only stamps the timing field.
Keep the same form action so the form still works if JavaScript never runs. When it does run, prevent the navigation, POST FormData with Accept: application/json, and read { ok, id }.
fetch() from the browser is subject to CORS. The project’s allowed domains must include the host serving the page.
---
const endpoint = 'https://api.furrowforms.com/s/fp_k7m2';
---
<form id="contact" action={endpoint} method="POST">
<input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off" />
<input type="hidden" name="_ft" value="" />
<label>
Email
<input name="email" type="email" required />
</label>
<label>
Message
<textarea name="message" required></textarea>
</label>
<button>Send</button>
</form>
<p id="contact-thanks" hidden>Thanks — we’ll be in touch.</p>
<script>
const form = document.getElementById('contact');
const ft = form?.querySelector('input[name="_ft"]');
if (ft) ft.value = String(Date.now());
form?.addEventListener('submit', async (event) => {
event.preventDefault();
const res = await fetch(form.action, {
method: 'POST',
headers: { Accept: 'application/json' },
body: new FormData(form),
});
const data = await res.json();
if (data.ok) {
form.hidden = true;
document.getElementById('contact-thanks').hidden = false;
}
});
</script>Progressive enhancement: no-JS visitors still get the 303 redirect.
The spam stack is on by default and lives on Furrow, not in the Astro project. Leave the honeypot _gotcha hidden and empty. Set _ft to Date.now() when the page loads; clients that omit _ft are not penalized, but browser forms should send it. get_snippet already emits both.
Cloudflare Turnstile is optional and recommended. Keys live on the project, not in the repo. When require_turnstile is on, get_snippet includes the widget. The widget posts cf-turnstile-response, which is a reserved field. Production site keys only render on hostnames listed on the Cloudflare widget; for local testing leave require_turnstile off or use Cloudflare’s always-pass test keys.
Also in force: a per-project domain allowlist, a per-IP per-form rate limit (default 10 requests / 60 seconds), and server-side filtering. Caught spam gets a normal 200 and is quarantined — it is not emailed as a normal lead, not delivered by webhook, and not counted toward quota. Notify addresses still get a [Potential spam] email so a false positive is not silent, unless you turn that off.
Classic HTML POST: Furrow responds 303 and the browser lands on the project’s thank-you URL (default_redirect_url). That URL has to be absolute and on an allowed domain. Furrow does not email the visitor; the page is the confirmation.
fetch() with Accept: application/json: the body is { "ok": true, "id": "<submission_id>" }. Hide the form and show your own message. Do not leave the visitor looking at raw JSON.
Uploads are opt-in per project, off by default, and inherited by every form. There is no per-form toggle. Turn them on for the website, then use a normal file input over multipart. JSON bodies cannot carry files.
Default accepted types are PDF, JPEG, PNG, and WebP. A multi-file field uses the [] suffix, the same convention as checkbox groups: name="photos[]". Files land in a private per-project inbox, one folder per form slug. Notification emails and webhooks link to that inbox. They never carry a raw or signed file URL.
<form action="https://api.furrowforms.com/s/fp_k7m2" method="POST" enctype="multipart/form-data">
<input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off" />
<input type="hidden" name="_ft" value="" />
<script is:inline>
document.currentScript.previousElementSibling.value = Date.now();
</script>
<input name="email" type="email" required />
<textarea name="message" required></textarea>
<input name="attachment" type="file" accept="application/pdf,image/jpeg,image/png,image/webp" />
<button>Send</button>
</form>The browser sets the multipart encoding when the form has a file input. Add enctype if you want it explicit.
Paste “Fetch furrowforms.com/ai and set up a contact form backend for my Astro site.” into Claude Code, Cursor, or any MCP client. With no token, the agent cold-starts: GET https://api.furrowforms.com/api/register, POST /api/register, you read one 6-digit email code, POST /api/register/verify. The token is shown once.
It then connects to https://api.furrowforms.com/mcp (Authorization: Bearer frw_…) or stdio via npx -y @furrowforms/mcp. One bootstrap_site call creates the client, the project, and every form, idempotent by slug. get_snippet returns Astro component code with the honeypot, the timing field, and Turnstile when the project requires it. test_webhook confirms a signed delivery. MCP and the REST API both work on the free tier. The public key does not belong in an env file.
FAQ
Add a .astro component whose form action is https://api.furrowforms.com/s/<public_key> and whose method is POST. No API route, adapter, or client JavaScript is required. Furrow filters spam, stores the submission, emails you, and 303-redirects the visitor to the thank-you URL configured on the project.
No. The form works from a fully static build because the backend is external. GitHub Pages, Cloudflare, Netlify, and a plain file server all behave the same way.
Yes. Keep the form action for no-JS visitors, and when JavaScript runs, fetch() the same URL with Accept: application/json. The body is { "ok": true, "id": "<submission_id>" }. The 303 redirect is only for a classic HTML POST.
Yes, once uploads are enabled on the Furrow project (off by default, inherited by every form). Use a file input; default types are PDF, JPEG, PNG, and WebP. Files land in a private inbox linked from the notification email and webhook, not at a public URL.
Yes. The agent reads furrowforms.com/ai, registers an account over POST /api/register (you read one email code), and calls bootstrap_site. MCP and the REST API both work on the free tier. get_snippet returns .astro markup for the form.
paste this into your agent
Fetch furrowforms.com/ai and set up forms for this site.