Responses & errors
Reference for JSON submission responses and the steps to take when a request is rejected.
Accepted submission
Authenticated submissions may also include leadId. A configured redirectUrl may appear when the target form has one. Public anonymous responses omit internal record identifiers.
HTTP 200json
{
"success": true,
"status": "success",
"statusCode": 200,
"message": "Lead captured successfully"
}Quarantined submission
The request was received but flagged for review. Inspect Spam Shield instead of treating HTTP 202 as a clean lead. An authenticated response may include spamId.
HTTP 202json
{
"success": false,
"status": "quarantined",
"statusCode": 202,
"message": "Submission received and quarantined for security inspection"
}Status code reference
| Code | Meaning | What to check |
|---|---|---|
200 | Accepted | The lead is stored in the target environment. |
202 | Quarantined | Review the submission in Spam Shield. |
400 | Invalid request | Check that the body is valid JSON or URL-encoded data. |
401 | Invalid API key | Check for a mistyped or revoked submission key. |
403 | Submission rejected | Check paused forms, origin rules, workspace ownership, and key environment. |
404 | Target not found | Copy the current form endpoint again; verify its ID or slug. |
405 | Wrong method | Use POST on /api/v1/leads. |
413 | Body too large | Reduce the request body below 1 MB. |
429 | Rate limited | Wait before sending another request. |
500 | Server error | Check server health and logs before retrying. |
Read the response body
Error responses can contain message, error, or both. Show a useful message to the visitor and keep the HTTP status available in your server logs. CORS failures may prevent browser JavaScript from reading the response; inspect the Network panel.
Infraly documentation