Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Edfermachado/proyectoSistemas/llms.txt
Use this file to discover all available pages before exploring further.
GET /api/auth/me is a lightweight route that resolves the caller’s active session and returns the full tenant record associated with it. It is primarily consumed by faculty admin UIs to display the current faculty context — for example, the faculty name and slug shown in the admin dashboard header. Because tenant information is encoded in the JWT as a tenantId, this endpoint performs a single database lookup against the tenants table and returns the matching row.
Endpoint
Authentication
This endpoint requires a validsession HTTP-only cookie containing a JWT with a non-null tenantId claim. The cookie is set automatically when a tenant_admin, event_manager, or access_control user logs in via loginFacultyAdmin. Standard user accounts and superadmin accounts carry a null tenantId and will receive a 401 response.
The cookie is sent by the browser automatically with every same-origin request — no manual header is required from the client side.
Request
No request body and no query parameters are accepted. The endpoint derives all required context from thesession cookie.
Response
On success the endpoint returns200 OK with the tenant object from the tenants table serialised as JSON.
UUID primary key of the tenant (faculty).
Human-readable name of the faculty. Unique across the platform.
URL-safe identifier for the faculty, derived from its name. Unique across the platform.
Optional long-form description of the faculty.
UUID of the parent university record this tenant belongs to. References the
universities table.UUID of the category that classifies this tenant (e.g. engineering, arts). References the
categories table.ISO 8601 timestamp of when the tenant was created.
Error Responses
| Status | Body | Reason |
|---|---|---|
401 Unauthorized | { "error": "Unauthorized" } | No session cookie is present, the JWT signature is invalid or expired, or the tenantId claim is null. |
Example
cURL
<your_session_token> with the raw JWT value from the session cookie. In a browser context the cookie is sent automatically; the explicit --cookie flag is only needed for direct API testing.
Successful Response
Unauthorized Response
Notes
- This endpoint is primarily intended for faculty admin UIs. Standard
useraccounts do not have atenantIdand cannot use this endpoint. - The
superadminrole also carries anulltenantIdand will receive a401. The super-admin dashboard uses separate endpoints that are not tenant-scoped. - The returned object is the raw
tenantsrow. Nested relations (e.g. the fulluniversityorcategoryobject) are not expanded.