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 becomes a field name in your Inbox.
Form data submission
You can also send FormData — useful when your JavaScript
collects values from an existing form element.
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 |
403 | Form is disabled or submission limit reached |
413 | Payload too large (body size exceeded) |
429 | Rate limited — too many responses from this IP |
503 | Form is paused by the owner |
CORS
The submission endpoint allows requests from any origin (
Access-Control-Allow-Origin: *), so fetch()
from any domain will work without proxy workarounds.