Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Glemynart/SaaS/llms.txt

Use this file to discover all available pages before exploring further.

Registering on La Oficina Nítida simultaneously provisions a new tenant (organization) and its first ADMIN user in a single database transaction. If any part of the operation fails — for example because the NIT is already taken — the entire transaction is rolled back and no partial data is left behind. The new tenant is created with activo: true. The returned payload confirms the created tenant and user but does not include tokens; after registration, proceed to POST /auth/login to obtain a session.

Endpoint

POST /auth/register
No authentication required. Returns 201 Created on success.

Request body

nombreTenant
string
required
Display name of the organization. Shown throughout the platform UI.
nit
string
required
Colombian NIT (Número de Identificación Tributaria) of the organization, without the check digit. Must be unique across all tenants.
digitoVerif
string
required
Single-character check digit that accompanies the NIT (e.g. "5" for NIT 900123456-5).
razonSocial
string
required
Full legal business name of the organization as registered with the DIAN.
email
string
required
Email address of the first ADMIN user. Stored in lowercase. Must be a valid email format.
passwordPlain
string
required
Password for the first ADMIN user. Minimum 8 characters, maximum 100 characters. Stored as a bcrypt hash — the plain-text value is never persisted.
nombre
string
required
First name of the first ADMIN user.
apellido
string
required
Last name of the first ADMIN user.

Response

A 201 Created response with the following shape:
tenant
object
user
object

Example request

curl -X POST https://api.oficina-nitida.com/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "nombreTenant": "Colegio San José de La Salle",
    "nit": "900123456",
    "digitoVerif": "5",
    "razonSocial": "Colegio San José de La Salle S.A.S.",
    "email": "admin@sanjose.edu.co",
    "passwordPlain": "MiClave2025!",
    "nombre": "Laura",
    "apellido": "Gómez"
  }'

Example response

{
  "tenant": {
    "id": "a3f8c2d1-4b5e-4f6a-8c9d-0e1f2a3b4c5d",
    "nombre": "Colegio San José de La Salle",
    "nit": "900123456"
  },
  "user": {
    "id": "b7e1f3a2-5c6d-4e7f-9a0b-1c2d3e4f5a6b",
    "email": "admin@sanjose.edu.co",
    "nombre": "Laura",
    "apellido": "Gómez",
    "rol": "ADMIN"
  }
}

Error cases

StatusCause
409 ConflictA tenant with the provided nit already exists. The error message is "Ya existe una empresa registrada con este NIT."
400 Bad RequestOne or more fields failed validation (e.g. email is not a valid address, passwordPlain is shorter than 8 characters, or a required field is missing).
Rate limit: this endpoint is limited to 3 requests per minute per IP address. Automated provisioning scripts should add appropriate delays between requests. Exceeding the limit returns 429 Too Many Requests.

Build docs developers (and LLMs) love