Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/tukit/llms.txt

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

Registering a new account creates a user record with a default role of Usuario (value "1") and an inactive activation status. After the record is saved, the API automatically generates a random 5-digit verification code, stores it on the user document, and dispatches it to the provided email address. The account cannot be used to log in until that code is confirmed via the Verify Account endpoint. POST /api/user/register

Authentication

No authentication required.

Request Body

userName
string
required
The display name for the new user. Stored as-is (not normalized to lowercase).
email
string
required
The user’s email address. Stored in lowercase. Must be unique across all accounts — if an account already exists with this address the request is rejected with a 202 response.
password
string
required
Plain-text password. Hashed with bcrypt (cost factor 10) before storage. Never returned in any response.

Response

200 — Success

msj
string
A human-readable confirmation message in Spanish confirming the account was created and that a verification code has been sent.
status
boolean
Always true on success.
savedUser
object
The newly created user document as returned by Mongoose.
The login_code field will be present on the returned savedUser object. Do not expose or store this value client-side — it is only used internally by the verification flow.

Error Responses

StatusCause
202A required field (userName, email, or password) is missing from the request body.
202An account with the provided email address already exists.
500Unexpected server or database error.
A 202 status does not indicate success in this API. Always check the status field in the response body — if it is false the operation did not complete.

Example

curl -X POST https://your-tukit-api.com/api/user/register \
  -H "Content-Type: application/json" \
  -d '{
    "userName": "MarcosDesigns",
    "email": "marcos@example.com",
    "password": "SuperSecret123"
  }'
Success response:
{
  "msj": "Cuenta creada exitosamente. Te hemos enviado un código de 5 dígitos a tu correo para que verifiques tu cuenta, por favor no lo compartas",
  "status": true,
  "savedUser": {
    "_id": "64f1a2b3c4d5e6f7a8b9c0d1",
    "userName": "MarcosDesigns",
    "email": "marcos@example.com",
    "roles": [{ "name": "Usuario", "value": "1" }],
    "activate": [{ "name": "Inactivo", "value": "2" }],
    "createdAt": "2024-06-01T12:00:00.000Z",
    "updatedAt": "2024-06-01T12:00:00.000Z"
  }
}
Error — email already registered:
{
  "msj": "Correo registrado. Por favor intenta con uno diferente",
  "status": false
}

Build docs developers (and LLMs) love