All endpoints on this page require anDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Jcofles/Proyecto-web/llms.txt
Use this file to discover all available pages before exploring further.
Authorization: Bearer {token} header. The token is obtained from a successful login via POST /api/auth/login or POST /api/auth/two-factor/verify. Requests made without a valid token receive a 401 Unauthenticated response.
Obtain a bearer token first via login before calling any endpoint on this page.
GET /api/auth/user
Returns the full profile of the currently authenticated user. Headers| Header | Value |
|---|---|
Authorization | Bearer {token} |
Responses
The authenticated user’s profile data.
Unique user identifier.
Full display name, computed from
nombres and apellidos.First name(s).
Last name(s).
Primary email address.
Backup email address used for secure key delivery.
ISO 8601 timestamp of the last time the
.jw file was downloaded, or null if never downloaded.ISO 8601 timestamp when the secure key was generated.
Whether two-factor authentication is currently active.
PUT /api/auth/update-profile
Updates one or more profile fields for the authenticated user. All fields are optional — only the fields included in the request body are updated. Changingemail initiates a verification flow: a 6-digit OTP is sent to the new address and the email is not updated until /api/auth/verify-email-change is called with the correct code.
Headers
| Header | Value |
|---|---|
Authorization | Bearer {token} |
Updated first name(s). Letters and spaces only. Maximum 191 characters.
Updated last name(s). Letters and spaces only. Maximum 191 characters.
Full name as a single string. The server splits it at the first space into
nombres and apellidos.New primary email address. Must be unique. Triggers OTP verification; does not update immediately.
Password changes are not supported via this endpoint. To reset your password, use the forgot-password flow.
Responses
Result description.
Updated user data (
id, name, nombres, apellidos, email, status). Present when no email change was requested.true when an email change was requested and an OTP has been sent to the new address.The pending new email address awaiting OTP confirmation.
Sending
email in the request body does not change the email immediately. The current email remains active until the OTP is verified via /api/auth/verify-email-change. The OTP expires after 15 minutes.POST /api/auth/verify-email-change
Confirms an email address change initiated byPUT /api/auth/update-profile. Submit the 6-digit OTP that was sent to the new address. On success, the account’s primary email is updated.
Headers
| Header | Value |
|---|---|
Authorization | Bearer {token} |
The 6-digit numeric OTP sent to the new email address. Exactly 6 characters. Expires after 15 minutes.
Responses
"Email actualizado exitosamente" on success.Updated user data reflecting the new email address.
DELETE /api/auth/delete-account
Soft-deletes the authenticated user’s account. The account email is obfuscated to free the address for future registrations, the account status is set toeliminado, all active tokens are revoked, and a confirmation email is sent to the original address.
Headers
| Header | Value |
|---|---|
Authorization | Bearer {token} |
Responses
"Cuenta eliminada exitosamente" on success.