Axuz Developers

POST /public/forms/{slug}/submit

Submit final do form (Fase 184a-async)

  • Access: Public
  • Service: https://api-forms.axuz.net

Accepted authentication

No authentication (public route, or protected by link/signature).

Pipeline: 1. Rate-limit (10/min/IP), honeypot, validate schema — síncrono. 2. Redis stream backup forms:submissions:incoming — best-effort. 3. INSERT ou promote (__presubmit_id) em form_submissions com captcha_status='pending'|'skipped'. 4. 201 imediato (~5-20ms). 5. Goroutine bg: verify captcha → triggers (email/webhook/calendar/…).

Trade-off: spammer recebe 201 (bots não param em 4xx). is_spam marcado no DB; nenhum trigger é notificado; dashboard filtra.

Aceita application/json OU application/x-www-form-urlencoded (submit no-JS do /render). Fields especiais no body: recaptcha_token, turnstile_token, __presubmit_id, axuz_hp.

Parameters

NameInTypeRequiredDescription
slugpathstringyes

Slug URL-safe do form (^[a-zA-Z0-9_-]{3,64}$).

Request body

application/json · Required

NameTypeRequiredDescription
(corpo)objectno

Chaves livres representam os field.name do FormSchema. Campos reservados (não são persistidos como data): - recaptcha_token: token reCAPTCHA v3. - turnstile_token: token Cloudflare Turnstile. - __presubmit_id: UUID de draft criado pelo pre-submit; quando setado, promove esse draft em vez de criar row nova. - axuz_hp: honeypot; qualquer valor não-vazio rejeita 400.

{}

Responses

201

Submission aceita

NameTypeRequiredDescription
idstring<uuid>yes
thank_youstringno
redirectstring | nullno
created_atstring<date-time>yes

400

Parâmetro/body inválido

NameTypeRequiredDescription
errorstringyes

404

Recurso não encontrado

NameTypeRequiredDescription
errorstringyes

422

Falha de validação de schema

NameTypeRequiredDescription
errorstringyes
fieldsobjectyes

Mapa field_name → mensagem.

429

Rate limit excedido (10/min/IP no /submit e /pre-submit)

NameTypeRequiredDescription
errorstringyes

500

Erro inesperado

NameTypeRequiredDescription
errorstringyes

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/submit' \
  -H "Content-Type: application/json" \
  -d '{}'

Node.js

const res = await fetch("https://api-forms.axuz.net/public/forms/SLUG/submit", {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({}),
});
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/submit",
    json={},
    timeout=30,
)
res.raise_for_status()
print(res.json())