POST /public/forms/{slug}/pre-submit
Auto-save draft (Fase 184a)
- Access: Public
- Service:
https://api-forms.axuz.net
Accepted authentication
No authentication (public route, or protected by link/signature).
Debounced pelo JS depois de cada input. Se o user abandona o form, temos o parcial no DB pra remarketing.
Sem captcha (drafts não notificam nem contam pra dashboard). Rate-limit reusa o bucket do /submit. Honeypot devolve 200 fake pra não dar dica ao bot. __presubmit_id no body = UPDATE (guarda team_id+form_id); ausente = INSERT novo com is_complete=false.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
slug | path | string | yes | Slug URL-safe do form ( |
Request body
application/json · Required
| Name | Type | Required | Description |
|---|---|---|---|
__presubmit_id | string<uuid> | no | UUID de draft (opcional). Ausente = INSERT novo. |
{
"__presubmit_id": "00000000-0000-0000-0000-000000000000"
}Responses
200
Draft persistido
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | UUID do draft (vazio quando honeypot detectou bot — resposta silenciosa). |
400
Parâmetro/body inválido
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
404
Recurso não encontrado
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
429
Rate limit excedido (10/min/IP no /submit e /pre-submit)
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
500
Erro inesperado
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
Examples
"Try it" is turned off in this reference. Use the examples with your test credential.
curl
curl -sS -X POST 'https://api-forms.axuz.net/public/forms/SLUG/pre-submit' \
-H "Content-Type: application/json" \
-d '{"__presubmit_id":"00000000-0000-0000-0000-000000000000"}'Node.js
const res = await fetch("https://api-forms.axuz.net/public/forms/SLUG/pre-submit", {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
"__presubmit_id": "00000000-0000-0000-0000-000000000000"
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
console.log(await res.json());Python
import os
import requests
res = requests.request(
"POST",
"https://api-forms.axuz.net/public/forms/SLUG/pre-submit",
json={
"__presubmit_id": "00000000-0000-0000-0000-000000000000",
},
timeout=30,
)
res.raise_for_status()
print(res.json())