POST /auth/signup
Cria uma nova conta (user + credencial argon2id) e dispara o e-mail de verificação, protegido por honeypot, rate-limit, blocklist, geo-bl...
- Access: Public
- Service:
https://auth-api.axuz.net
Accepted authentication
No authentication (public route, or protected by link/signature).
Cria uma nova conta (user + credencial argon2id) e dispara o e-mail de verificação, protegido por honeypot, rate-limit, blocklist, geo-block, Turnstile e reCAPTCHA.
Motivo: única rota de criação de conta pública. Concentra defesa em profundidade contra bot/spam/fraude porque é o vetor primário de abuso (criação em massa pra spam interno). Retorna 201 com flag requires_email_verification — user não recebe cookies aqui, só depois de confirmar via link (verify-email). Comportamento: (1) decoda body incluindo website_url (honeypot); (2) honeypot preenchido → responde 200 opaco sem persistir; (3) normaliza email; (4) sanitizeDisplayName — BUG QA-S9 #2/#1 — strip HTML, rejeita control-char, valida 2-80 runes (roda ANTES do resto); (5) valida email (regex + tamanho); (6) valida senha forte (checkPasswordPolicy: ≥12 runas, letra+dígito e, se ligado, ausência em vazamento conhecido via HIBP — D-014); (7) rejeita role-accounts (admin@/webmaster@/etc.); (8) rejeita domínios descartáveis; (9) checa ip_blocklist — bloqueado registra failure e responde 200 opaco (não dá dica pro atacante); (10) countryBlocked — 403 pra regiões vetadas; (11) rate-limit signup:<ip> 5/hora com Retry-After; (12) Turnstile + reCAPTCHA se envs setadas; (13) HashPassword — argon2id nos parâmetros ativos (W-031); (14) SignupCreateUser — 409 em email_taken; (15) issueAndSendVerification — falha só vira log warn, não bloqueia retorno (graceful degrade); (16) 201 payload {user{id,email,name}, requires_email_verification:true}.
Entradas: body JSON {email, password, name, captcha_token, turnstile_token, website_url}; r.RemoteAddr/X-Forwarded-For. Domínio interno: e-mail @INTERNAL_MAIL_DOMAIN sem X-Axuz-Seed-Token válido ⇒ 400 internal_domain_reserved antes de qualquer I/O.
Retorno: 201 payload; 400 body/email/senha/nome inválidos; 403 geo-block/captcha; 409 email_taken; 429 rate-limit; 500 hash falha.
Parameters
No parameters.
Request body
Corpo JSON. O schema detalhado deste endpoint ainda não está tipado na spec; veja a descrição da operação.
application/json
| Name | Type | Required | Description |
|---|---|---|---|
(corpo) | object | no |
{}Responses
201
Payload
400
Body/email/senha/nome inválidos
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
403
Sem permissao (nao e owner/admin; token sem escopo; token de integracao em rota nao permitida)
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
409
Email_taken
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
429
Limite de requisições excedido.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
500
Hash falha
| 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://auth-api.axuz.net/auth/signup' \
-H "Content-Type: application/json" \
-d '{}'Node.js
const res = await fetch("https://auth-api.axuz.net/auth/signup", {
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://auth-api.axuz.net/auth/signup",
json={},
timeout=30,
)
res.raise_for_status()
print(res.json())