The Users API covers the full lifecycle of user accounts within UniEvents. Users are always scoped to a tenant (faculty), except forDocumentation 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.
superadmin accounts which operate globally. The service layer hashes all passwords with bcrypt before they reach the database — never store or transmit plain-text passwords. The /managers sub-resource provides tenant-scoped manager management, while /notifications derives real-time alerts from each user’s event attendance records.
GET /api/users
Returns all users that belong to a specific tenant, ordered by creation date (newest first). Authentication: Not required.UUID of the tenant whose users you want to list. Returns
400 if omitted.UUID of the user.
Unique email address used for login.
First name.
Last name / surname.
National ID or document number.
Contact phone number.
User role. One of
superadmin, tenant_admin, event_manager, access_control, or user.UUID of the user’s tenant.
null for superadmin accounts.Organizer classification. Defaults to
"academico".Timestamp when the account was created.
POST /api/users
Creates a new user account. ThepasswordHash field accepts a plain-text password — it is hashed with bcrypt (cost 10) before being stored. When creating a tenant_admin, personal identification fields become required.
Authentication: Not required.
Content-Type: application/json
Unique email address for the new account.
Plain-text password. The service hashes this before insertion.
User role. Defaults to
"user" if not provided.UUID of the tenant to assign the user to.
First name. Required when
role is "tenant_admin".Last name. Required when
role is "tenant_admin".National ID or document number. Required when
role is "tenant_admin".Contact phone number. Required when
role is "tenant_admin".| Status | Description |
|---|---|
400 | role is "tenant_admin" but name, lastName, documentId, or phone is missing. |
GET /api/users/{id}
Returns a single user by UUID. Authentication: Not required.UUID of the user to retrieve.
PUT /api/users/{id}
Updates an existing user. Only the fields included in the request body are modified. IfpasswordHash is supplied, it is re-hashed before being stored.
Authentication: Not required at the route level (enforce access control in your middleware or client).
Content-Type: application/json
UUID of the user to update.
Updated email address.
Updated role.
Updated tenant assignment. Pass
null to unlink.New plain-text password to replace the current one.
DELETE /api/users/{id}
Permanently deletes a user account. Authentication: Not required at the route level.UUID of the user to delete.
GET /api/users/managers
Returns the list of managers belonging to the current session’s tenant. By default onlyevent_manager role users are returned, but the role query parameter can broaden or narrow the filter.
Authentication: Required (session cookie with a valid tenantId). Returns 401 if no session or if the session has no tenantId.
Filter by role. Defaults to
"event_manager" if omitted. Pass any valid role string (e.g. "access_control") to retrieve users with that role instead.UUID of the manager.
Manager’s email address.
Role of the user (e.g.
"event_manager", "access_control").First name.
Last name.
National ID.
Contact phone.
POST /api/users/managers
Creates a new manager (or access control staff) and automatically scopes them to the current session’s tenant. ThetenantId is never accepted from the request body — it is always taken from the authenticated session to prevent tenant spoofing.
Authentication: Required. The session user must have the role tenant_admin or superadmin, and must have a tenantId in their session. Returns 401 otherwise.
Content-Type: application/json
Unique email for the new manager account.
Plain-text password. Hashed with bcrypt (cost 10) before insertion.
Role to assign. Defaults to
"event_manager" if an unrecognised value is passed.First name of the new manager.
Last name of the new manager.
National ID or document number.
Contact phone number.
| Status | Description |
|---|---|
401 | No session, insufficient role, or session lacks a tenantId. |
GET /api/users/notifications
Returns a derived list of in-app notifications for the currently authenticated user, based on their event attendance records. No session returns an emptynotifications array rather than an error.
Authentication: Required (session cookie with a valid userId). Returns { "notifications": [] } if no valid session is found — this endpoint never returns a 401.
Array of notification objects, sorted by most recent first.
Prefixed identifier derived from the attendance record. Prefix reflects state:
pending-, verifying-, or confirmed-.Short notification title shown in the UI.
Human-readable message describing the notification context, including the event title.
Semantic type used to determine badge colour and icon in the UI.
"warning"— payment registered but no reference uploaded yet."info"— payment reference uploaded and awaiting admin verification."success"— payment verified and ticket confirmed.
Relative URL the user should navigate to for more context. Confirmed tickets include a
?viewTicket= query param with the ticket token.Timestamp of the underlying attendance record. For confirmed tickets, this is
paymentVerifiedAt if available, otherwise createdAt.