API Submissions
Submit forms to formbuild.io with JavaScript using fetch(), XMLHttpRequest, or from React, Vue, and other SPAs.
If your site is a single-page app (React, Vue, Svelte, etc.) or you want to submit without a full page reload, use JavaScript to POST to your formbuild.io endpoint.
JSON submission
Send a JSON body with Content-Type: application/json. Each
key must match a name configured in the form's Form Builder;
matching values appear in your Inbox and unknown keys are ignored.
Form data submission
You can also send FormData — useful when your JavaScript
collects values from an existing form element. Text values are
accepted; binary file parts are currently ignored.
Preventing duplicate responses
If a user double-clicks submit or the network retries, you can prevent
duplicate responses by sending an Idempotency-Key header.
Use a unique value per submission attempt (e.g. a UUID generated on the
client).
If the same key is sent again within 24 hours, we return the original success response without creating a second entry.
Handling errors
The endpoint returns standard HTTP status codes:
| Status | Meaning |
|---|---|
200 / 302 | Success (message or redirect) |
400 | Validation failed — check error in the JSON body |
413 | Payload too large (body size exceeded) |
429 | Rate limited — too many responses from this IP |
503 | Form is paused, its monthly response limit was reached, or configured spam protection is unavailable |
CORS
The submission endpoint allows requests from any origin (
Access-Control-Allow-Origin: *), so fetch()
from any domain will work without proxy workarounds.
Need to manage forms or read responses?
This page documents the public submission endpoint. To create API keys, manage forms, or read stored responses from a trusted server or AI agent, use the authenticated REST API & API Keys.