Integrate · Last updated May 16, 2026
Response format
When you POST JSON (for example with fetch), the submit endpoint always responds with JSON. Classic HTML form POSTs redirect to a success page instead — see Custom redirects.
AI assistant prompt
Not an integration scaffold — advises on JSON response shapes, HTTP statuses, HTML-form vs programmatic POST behaviour, plus when to substitute your dashboard form ID.
Help me handle SaveForm.io submit responses correctly when POSTing programmatically from JavaScript/TypeScript (fetch, axios, etc.).
Please:
1. Walk me through reading response.ok, await response.json(), and branching UX for successes vs typed errors.
2. Map common HTTP statuses to user-facing messaging (quota, missing form ID, malformed payload).
3. Explain when I get JSON versus when a classic HTML <form POST> redirects to SaveForm-hosted pages.
4. If I am also authoring the POST call, briefly remind me to swap in my real dashboard form ID wherever the endpoint URL mentions YOUR_FORM_ID.
Response handling reference (fetch / XHR POST with JSON Accept/Content-Type):
• Success: HTTP 200 with JSON like { "success": true, "message": "…" }
• Errors: JSON with both "error" (code/key) and "message" (human text)
• Typical statuses — 400 bad/missing payload, 404 unknown form ID, 429 rate/quota exceeded, 413 payload too large (see docs for full list)
• Classic HTML <form action="…"> submits redirect to SaveForm-hosted success/redirect UX — not JSON — unless I use JS fetch instead.
Docs: https://www.saveform.io/docs/response-formatSuccess
A 200 response confirms the submission was stored.
JSONresponse.json
{
"success": true,
"message": "Submission received successfully"
}Errors
Errors come back with an error key and a human-friendly message.
JSONresponse.json
{
"error": "Submission limit reached",
"message": "Your monthly submission limit has been reached."
}Status codes
| Status | Meaning |
|---|---|
200 OK | Submission stored and any webhooks / emails queued. |
400 Bad Request | The payload was missing required fields or could not be parsed as JSON or form-encoded data. |
404 Not Found | The form ID in the URL does not exist or has been deleted. |
429 Too Many Requests | You hit your monthly submission limit. Upgrade your plan or wait for the next billing period — see Rate limits. |
500 Server Error | Something blew up on our side. Safe to retry — submissions are idempotent by request ID. |