What actually happens when a form posts to an endpoint
Short answer: A form endpoint is a single POST URL. It identifies the form, checks status, limits, size and structure, stores the submission inside a transaction that also counts usage, then returns a status the browser or script can act on.
Most form tutorials stop at the action attribute. The interesting part starts after the browser sends the request: a useful endpoint has an order of operations, and every failure has a distinct status code.
Take a plain HTML form pointed at a Formivo endpoint. One submission touches five steps, in this order.
1. The browser builds a request
<form action="https://formivo.faizyab.me/api/f/YOUR_FORM_ID" method="POST">
<input name="name" required />
<input name="email" type="email" required />
<textarea name="message"></textarea>
<input type="hidden" name="page" value="/contact" />
<input type="hidden" name="_redirect" value="https://your-site.com/thanks" />
<button type="submit">Send</button>
</form>The method matters. A form without method="POST" defaults to GET, and the endpoint answers 405 rather than storing anything. Form-encoded is the default Content-Type; JSON and multipart without files also work.
2. The form is identified and checked
The path carries the form id. An unknown id returns 404, so a truncated copy-paste fails loudly and quickly. A paused form returns 409 even though the id is valid — the difference tells you whether to check the URL or the form's status.
3. Abuse and size limits run before storage
- 1Rate limits stop a single form, a single IP, or one IP hitting one form from flooding intake.
- 2The body is capped at 256 KB, 100 fields and five levels of nesting.
- 3The origin rule, when a form lists allowed domains, rejects browser requests from other sites.
- 4A filled honeypot field is accepted and discarded, so a bot learns nothing from the response.
These checks are deliberately cheap and happen before a row exists. Rejecting early is what keeps a public write endpoint from becoming a storage problem.
4. Storage and usage commit together
The monthly allowance is checked in the same transaction that inserts the submission. Either the row and the usage counter both move, or neither does. That is why a traffic spike cannot push a workspace past its plan and why a request that hits the cap returns 409 with nothing stored.
5. The response tells you what to do next
{
"success": true,
"leadId": "9d1f2c4a-7b3e-4f1a-9c2d-1a2b3c4d5e6f",
"message": "Submission received."
}An HTML form with _redirect sends the visitor to your thank-you page after success; without it, Formivo's own confirmation appears. A fetch-based form keeps the user on the page and decides what to show based on the status code.
The shortest possible test
curl -X POST "https://formivo.faizyab.me/api/f/YOUR_FORM_ID" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: first-check" \
-d '{ "name": "Ada", "email": "ada@example.com" }'Open the form's submissions immediately afterwards. If nothing appears, the response code is the first clue: 404 for a wrong id, 409 for a paused form or exhausted quota, 429 for rate limiting, 4xx for a malformed body.
That is the whole contract. Once it is clear, the integration guides for HTML, React and Next.js are variations on the same four lines.