Formboost API Guide — Submit and Read Form Data Programmatically
Submit form data via JSON POST, read submissions via the REST API, and configure endpoints programmatically. Complete reference with code examples in JavaScript, Python, and cURL.
Formboost API Guide — Submit and Read Form Data Programmatically
Formboost works with plain HTML forms, but it's also a full REST API. This guide covers programmatic form submission, reading submissions, and configuration options you can use to customize behavior from your code.
Submitting a Form
Send a POST request to your endpoint URL:
POST https://formboost.app/f/YOUR_ENDPOINT_ID
JSON Submission
1const res = await fetch("https://formboost.app/f/YOUR_ENDPOINT_ID", {
2 method: "POST",
3 headers: { "Content-Type": "application/json" },
4 body: JSON.stringify({
5 name: "Jane Smith",
6 email: "[email protected]",
7 message: "Hello, I'd like to learn more.",
8 }),
9});
10
11if (res.ok) {
12 console.log("Submitted");
13} else {
14 console.error("Failed:", res.status);
15}FormData Submission (HTML-style)
1const formData = new FormData();
2formData.append("name", "Jane Smith");
3formData.append("email", "[email protected]");
4formData.append("message", "Hello!");
5
6await fetch("https://formboost.app/f/YOUR_ENDPOINT_ID", {
7 method: "POST",
8 body: formData,
9});cURL
1curl -X POST https://formboost.app/f/YOUR_ENDPOINT_ID \
2 -H "Content-Type: application/json" \
3 -d '{"name": "Jane Smith", "email": "[email protected]", "message": "Hello"}'Python (requests)
1import requests
2
3response = requests.post(
4 "https://formboost.app/f/YOUR_ENDPOINT_ID",
5 json={
6 "name": "Jane Smith",
7 "email": "[email protected]",
8 "message": "Hello",
9 }
10)
11
12print(response.status_code) # 200 if successfulResponse Codes
| Status | Meaning |
|---|---|
| 200 OK | Submission accepted |
| 422 Unprocessable Entity | Missing required field |
| 429 Too Many Requests | Rate limit exceeded |
| 5xx | Server error |
Always check the status code before reporting success to the user.
Reserved Field Names
These field names have special behavior:
| Name | Effect |
|---|---|
_redirect | Redirect URL after HTML form submission |
_honey | Honeypot — submissions with this field filled in are discarded silently |
_subject | Custom subject line for email notifications |
Example — custom email subject:
1await fetch("https://formboost.app/f/YOUR_ENDPOINT_ID", {
2 method: "POST",
3 headers: { "Content-Type": "application/json" },
4 body: JSON.stringify({
5 name: "Jane",
6 email: "[email protected]",
7 message: "Question about pricing",
8 _subject: "New pricing inquiry from Jane",
9 }),
10});Allowed Origins (CORS)
By default, Formboost accepts submissions from any origin. To restrict submissions to your domain only, configure the Allowed Origins setting in your endpoint's settings.
https://yoursite.com
Multiple origins can be added, one per line. Requests from unlisted origins will be rejected with a 403.
Reading Submissions via the API
Retrieve your submissions programmatically using the REST API (requires an API key from your dashboard):
1const res = await fetch("https://formboost.app/api/submissions", {
2 headers: {
3 "Authorization": "Bearer YOUR_API_KEY",
4 "Content-Type": "application/json",
5 },
6});
7
8const { submissions } = await res.json();
9// submissions is an array of submission objectsEach submission object includes the submitted field values, a timestamp, and a unique submission ID.
Spam Filtering
Formboost runs every submission through an AI spam classifier. The spam score is available in the dashboard for each submission. In strict mode, submissions above the spam threshold are automatically discarded before they reach your dashboard or trigger notifications.
To configure:
- Open your endpoint in the dashboard
- Go to Settings → Spam Filtering
- Toggle strict mode on or off
You can also use the _honey field as a first layer of defense — add it as a hidden field in your form:
1<input type="text" name="_honey" style="display:none" tabindex="-1" autocomplete="off" />Any submission with _honey filled in is discarded before reaching the AI filter.
Rate Limiting
Formboost enforces per-endpoint rate limits to protect your inbox. On the free plan, endpoints accept up to 50 submissions per month. When the limit is reached, subsequent submissions return a 429 status code.