API Reference
Endpoints, request formats, and response codes for the SimplyForms public API.
Submit a form
POST
/v1/forms/{formId}/submissionsSubmit data to a form. This is a public endpoint — no authentication required.
Request
Accepts two content types:
application/x-www-form-urlencoded— standard HTML form submission.application/json— JSON body with key-value pairs.
Example (JSON)
curl -X POST https://api.simplyforms.dev/v1/forms/YOUR_FORM_ID/submissions \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Doe",
"email": "jane@example.com",
"message": "Hello from the API!"
}'Example (fetch)
const response = await fetch(
"https://api.simplyforms.dev/v1/forms/YOUR_FORM_ID/submissions",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
name: "Jane Doe",
email: "jane@example.com",
message: "Hello from the API!",
}),
}
);
const result = await response.json();
console.log(result); // { success: true, message: "Submitted successfully" }Response
Success (201)
{ "success": true, "message": "Submitted successfully" }If the form has a redirect URL, the response also includes it as redirectUrl, so your script can send the visitor there.
Plain HTML forms (no JavaScript)
When a browser submits a plain <form method="POST"> straight to this endpoint, the response is a 303 redirect instead of JSON: to the form's redirect URL if it has one, otherwise to a SimplyForms confirmation page. If the submission is rejected, the browser goes to a SimplyForms error page instead of receiving the JSON errors below. Requests from fetch(), XHR and servers always get JSON.
Errors
| Status | Reason |
|---|---|
400 | Empty submission body, missing or expired CAPTCHA token, or failed spam verification. |
404 | Form not found — check your Form ID. |
500 | Server error (e.g., database failure, misconfigured CAPTCHA). |
Special Fields
| Field | Description |
|---|---|
_honey | Honeypot field. If filled, submission is silently accepted but ignored. |
_gotcha | Alternative honeypot field. Same behavior as _honey. |
email | If present, used as the reply-to address in email notifications. |
_replyto | Explicit reply-to override (used if email is not present). |
sf-captcha-response, cf-turnstile-response, g-recaptcha-response, h-captcha-response, frc-captcha-response | CAPTCHA token from SimplyForms Shield, Turnstile, reCAPTCHA, hCaptcha or Friendly Captcha. Required when that provider is enabled for the form; the widget fills it in. Automatically removed before storing. See spam protection. |