Forms
Responses and error codes
Mailiy API responses and every error code with its HTTP status, for example for limits, captcha and file uploads.
{ "success": true, "message": "Submission received.", "body": { "data": { "email": "…" }, "message": "Submission received." } }
{ "success": false, "code": "consent_required", "message": "…", "body": { "data": {}, "message": "…" } }The body field has the same shape as web3forms, so existing scripts keep working. On 429 the Retry-After header says how many seconds to wait: 60 for rate_limited (more than 5 submissions a minute), until the first of the month for limit_reached.
| Code | HTTP |
|---|---|
invalid_body | 400 |
origin_not_allowed | 403 |
api_key_required | 403 |
captcha_failed | 403 |
form_disabled | 403 |
invalid_access_key | 404 |
consent_required | 422 |
empty_submission | 422 |
file_rejected | 422 |
file_too_large | 413 |
storage_full | 413 |
limit_reached | 429 |
rate_limited | 429 |
delivery_failed | 500 |
scan_failed | 503 |
Whether Mailiy is working normally right now is shown on the status page. For your own monitoring, GET /api/status returns the same as JSON, no key needed.
To see which answer your form gives right now, use test your form. It sends a real submission and shows status, code and JSON.