API Registro Pendientes uses stateless JWT (JSON Web Token) bearer authentication. Every protected endpoint requires a valid token in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/CLINTONARMANDO/apiregistropendientes/llms.txt
Use this file to discover all available pages before exploring further.
Authorization request header. Tokens are issued by POST /auth and do not expire — access is revoked only when an administrator deactivates the user account.
Obtaining a token
CallPOST /auth with your DNI and password. On success, the response contains a signed JWT and a user object with your account details and role.
Endpoint
Request
Content-Type:application/json
The user’s national identity number (DNI). This is the unique login identifier for every user account. Example:
"12345678".The user’s plaintext password. Passwords are verified against a BCrypt hash stored in the database — never stored in plain text.
Response
A signed HMAC-SHA256 JWT. Pass this value in the
Authorization: Bearer header for all subsequent requests. The token encodes the user’s ID (as the subject) and role claim.Full name of the authenticated user.
Email address of the authenticated user.
The role identifier string assigned to this user, e.g.
"ADMIN", "TECNICO".Examples
- cURL
- JavaScript
- Python
Using the token in requests
Include the token in theAuthorization header of every request to a protected endpoint. Use the Bearer scheme.
- cURL
- JavaScript
- Python
Public routes (no token required)
The following paths are publicly accessible and do not require anAuthorization header:
| Path pattern | Purpose |
|---|---|
/auth/** | Login and token validation |
/app/** | Mobile app version metadata |
/swagger-ui/** | Interactive API documentation |
/v3/api-docs/** | OpenAPI schema endpoint |
Validating a token
UseGET /auth/validar-token to verify that a token is still valid and retrieve the associated user information. This endpoint is useful for session restoration on app startup.
Endpoint
- cURL
- JavaScript
- Python
- 200 OK — Token is valid. Response body contains the user object.
- 401 Unauthorized — Token is missing, malformed, or the associated user has been deactivated.
Common authentication errors
All authentication failures return HTTP401 Unauthorized. The response body provides a message indicating the cause.
User not found (DNI does not exist)
User not found (DNI does not exist)
Cause: No user account exists with the provided DNI.Response:Resolution: Verify the DNI is correct and that the account has been created by an administrator.
Wrong password
Wrong password
Cause: The DNI exists but the BCrypt password verification failed.Response:Resolution: Check that the password is correct. Contact your administrator to reset it if needed.
User account is inactive
User account is inactive
Cause: The account exists and the password is correct, but the Resolution: An administrator must reactivate the account via
vigente flag is false. The server rejects login for inactive users.Response:PUT /api/usuarios/{id} with "vigente": true.Missing or malformed Authorization header
Missing or malformed Authorization header
Token lifetime and revocation
Key points about token lifetime:- No expiration: The JWT payload contains no
expclaim. The token is valid for as long as the user account remains active. - Revocation by deactivation: The only way to invalidate a token is for an administrator to set the user’s
vigenteflag tofalse. The next request using that token will fail validation atGET /auth/validar-tokenor on any protected endpoint. - No refresh flow: Because tokens do not expire, there is no refresh token mechanism. Clients simply reuse the same token until it stops working.
- Token contents: Each token encodes the user’s numeric ID (as the JWT subject) and their role identifier as a claim. The signing key is configured on the server and uses HMAC-SHA256.