HTTP status code defined.
An HTTP status code is the three-digit number a server returns with every response to say what happened with the request, from success to redirect to error.
How HTTP status codes work
Every HTTP response opens with a status code, a three-digit number grouped by its first digit. 2xx means success, 3xx means the client should go somewhere else, 4xx means the request was wrong, and 5xx means the server broke. So 200 is a plain OK, 303 tells the browser to redirect to a thank-you page, 422 says the submitted data failed validation, and 429 says you're sending too fast.
For a form, the status code is how the endpoint answers your POST. A browser handles some codes on its own: it follows a 3xx to the next page automatically, which is exactly how a form redirect works. A fetch call, though, has to read the code itself, branching on it to show a success message or surface the error. That's why a good form backend returns honest, specific codes rather than a blanket 200. FormWire replies with a 2xx when a submission lands, a 3xx when you've configured a redirect, and a 4xx with a JSON explanation when validation fails, so both plain HTML forms and scripted ones know precisely what happened.
Four numbers a form cares about.
2xx, success
The submission was received and accepted. A 200 or 201 is your signal to show a confirmation or let the visitor move on.
3xx, redirect
The server is sending the visitor elsewhere. A 303 after a POST is how a form quietly lands on a thank-you page.
4xx, you fix it
The request was rejected. A 422 flags failed validation and a 429 flags rate limiting, each with a body explaining the problem.
Related questions
Any code in the 2xx range, most commonly 200 OK or 201 Created. If you've set up a redirect, you'll instead see a 3xx that the browser follows straight to your thank-you page, which is also a success in practice.
It means the request was well-formed but the data failed validation, like a missing required field or a malformed email. The response body usually carries a JSON explanation you can read and show the visitor, rather than a generic failure.
See how validation drives the status →Because the code is how a script knows what happened without parsing prose. A blanket 200 forces you to inspect the body to tell success from failure. Specific codes let a fetch call branch cleanly on the number and handle redirects, errors and rate limits correctly.
A 2xx when a submission is accepted, a 3xx when you've configured a redirect to a thank-you page, and a 4xx with a JSON message when validation fails or a rate limit is hit. The codes are consistent, so plain HTML and fetch forms both behave predictably.
Want to see it working?
Read the docsGet honest status codes on every submission.
Free tier forever. No credit card required.