Integrate
Errors and status codes
What each status means, the body you get back, and how to surface it to the person filling the form.
| Status | Meaning | Body |
|---|---|---|
200 | Stored and delivered | { "ok": true, "id": "…" } |
200 | Caught by the honeypot | { "ok": true } with no id |
400 | Body could not be parsed or is too large | { "statusMessage": "…" } |
404 | Unknown form ID, or the form is a draft | { "statusMessage": "Form not found" } |
410 | Form is closed or reached its response limit | { "statusMessage": "This form is closed" } |
422 | A builder rule failed | { "statusMessage": "Email is required", "data": { "errors": [ … ] } } |
429 | Rate limited | { "statusMessage": "Too many submissions…" } |
Validation errors
A 422 lists every failing field so you can show all problems at once:
{
"statusMessage": "Email is required",
"data": {
"errors": [
{ "field": "email", "message": "Email is required" },
{ "field": "message", "message": "Must be at least 20 characters" }
]
}
}Handling in the browser
const res = await fetch(endpoint, { method: 'POST', headers, body })
if (res.ok) return showThanks()
const err = await res.json().catch(() => ({}))
if (res.status === 422) showFieldErrors(err.data?.errors ?? [])
else if (res.status === 429) showMessage('Please wait a moment and try again.')
else showMessage(err.statusMessage || 'Something went wrong.')Something missing or wrong? Email us and we will fix it.