PlataformaEduca uses stateless JWT authentication. Every protected endpoint expects a signed token in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/miagv/PlataformaEduca/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header. Tokens are issued at login, signed with HS256, and expire after 24 hours (86400000 ms). No server-side session state is kept — each request is validated independently.
Register a new user
Send aPOST request to /api/auth/register with a JSON body containing the new user’s details.
Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
nombres | string | Yes | First name(s) of the user. |
apellidos | string | Yes | Last name(s) of the user. |
email | string | Yes | Unique email address used to log in. |
password | string | Yes | Plain-text password; stored as a BCrypt hash. |
rol | string | Yes | The role to assign. See valid values below. |
Valid rol values
COORDINADOR
Grants access to
/api/coordinador/** endpoints.DOCENTE
Grants access to
/api/docente/** endpoints.ESTUDIANTE
Grants access to
/api/estudiante/** endpoints.USER / ADMIN
Base roles;
ADMIN is typically reserved for system administrators.Successful response
On success, the API returns the created user object with HTTP 200:Registration automatically creates the corresponding role-specific profile record. Registering with
DOCENTE creates a Docente entry; ESTUDIANTE creates an Estudiante entry; COORDINADOR creates a Coordinador entry.Log in
Send aPOST request to /api/auth/login with the user’s email and password.
Successful response
token value — you will include it in every subsequent request.
Use the token
Include the token in theAuthorization header as a Bearer token on every protected request:
Token expiry
Tokens are valid for 24 hours (86400000 ms) from the time of issue. After expiry, protected requests return401 Unauthorized. Re-authenticate by calling /api/auth/login again to receive a new token.
Public vs. protected routes
| Route pattern | Access |
|---|---|
/api/auth/register | Public — no token required |
/api/auth/login | Public — no token required |
/api/cursos/** | Any authenticated user |
/api/notas/** | Any authenticated user |
/api/coordinador/** | COORDINADOR role only |
/api/docente/** | DOCENTE role only |
/api/estudiante/** | ESTUDIANTE role only |
/swagger-ui/** | Public |
/v3/api-docs/** | Public |
Common errors
401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
The token is valid but the authenticated user does not have the role required for the requested endpoint. For example, a
DOCENTE user calling a /api/coordinador/** route will receive a 403.