Febasidocs
Registration

Summary

Cheat sheet — pick a path, copy the curl, recognize the common errors.

Pick a path

NeedPathCredential
Create the first user right after the Eved Auth wizardAdmin via Eved dashboardYour Eved session — open the Auth project, Users tab.
Let an admin in your product create other usersAdmin via JWT (in-product)Authorization: Bearer <admin-jwt>
Run a public signup page in your tenant's appServer-side proxyck_* with users:create + X-Tenant-Code
One-off admin task without writing codeAdmin via Eved dashboardYour Eved session — Auth project, Users tab.

Curl quick reference

In-product admin (JWT)

curl -X POST https://auth.febasi.com.br/api/v1/register \
  -H "Authorization: Bearer $ADMIN_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "alice@acme.com",
    "password": "Strong-Pass-12!"
  }'

Server-side proxy (Client Key)

curl -X POST https://auth.febasi.com.br/api/v1/register \
  -H "X-API-Key: $CK_SECRET" \
  -H "X-Tenant-Code: acme" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "alice@acme.com",
    "password": "Strong-Pass-12!"
  }'

Both return 201 Created with the new user's id, email, username, cpfCnpj, tenantId, and createdAt.

Body in one glance

{
  "email": "alice@acme.com",     // one-of: email | username | cpfCnpj
  "username": "alice",            // 3–100 chars
  "cpfCnpj": "12345678901",       // exactly 11 (CPF) or 14 (CNPJ) digits
  "password": "Strong-Pass-12!"   // ≥ 8 chars + tenant's policy
}

At least one of email, username, cpfCnpj is required. The endpoint does not assign roles — call POST /api/v1/roles/assign after.

Common errors

StatusCodeMost likely cause
400VALIDATION_ERRORMissing every identifier, malformed field, or password under 8 chars.
400PASSWORD_POLICY_VIOLATIONPassword fails the tenant's passwordPolicy. Response includes violations[].
401MISSING_TENANT_CONTEXTClient Key call without X-Tenant-Code, or X-Tenant-Code does not resolve.
403INSUFFICIENT_SCOPEClient Key lacks users:create.
409CONFLICTEmail / username / CPF / CNPJ already taken inside that tenant.

Next steps

On this page