The Events API is the core of UniEvents. Each event belongs to a faculty tenant and is bound to a physical space. Before an event is persisted, the service layer runs an overlap check — if another event already occupies the same space during the requested time window, the request is rejected with aDocumentation 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.
CONF_001 conflict error. Images are uploaded to Supabase storage, compressed to WebP via Sharp, and the resulting URL is stored alongside the event record.
GET /api/events
Returns all events that belong to a given tenant, ordered by creation date (newest first). Each event in the response includes the relatedspace object.
Authentication: Not required.
The UUID of the tenant (faculty) whose events you want to retrieve. Returns
400 if omitted.UUID of the event.
Display title of the event.
URL-safe unique identifier auto-generated from the title.
Optional longer description of the event.
Start date and time of the event in UTC.
Ticket price. Defaults to
"0.00" for free events.Supabase public URL for the event cover image (WebP).
Duration in minutes. Defaults to
60.UUID of the owning tenant (faculty).
UUID of the reserved venue space.
Maximum number of attendees.
null means unlimited.Whether the event is publicly listed or restricted.
Approval status. Events created by
event_manager users start as "pendiente"; tenant_admin and superadmin events default to "aprobado".If
true, access to the event is restricted by IP.Whether the event is highlighted on the tenant’s public page.
Mobile payment phone number (for mobile transfer payments).
Payment account identifier.
Bank name for payment instructions.
UUID of the user responsible for managing this event.
Timestamp when the record was created.
Related space object. See the Spaces schema for field details.
POST /api/events
Creates a new event. The request must be sent asmultipart/form-data to support optional image upload. The service checks for scheduling conflicts in the target space before inserting the record. A unique slug is generated automatically from the title.
Authentication: Required (session cookie). Returns 401 if no valid session is present.
Content-Type: multipart/form-data
Display title for the event.
UUID of the tenant (faculty) that owns this event.
UUID of the space where the event will be held. Used for conflict detection.
ISO 8601 date-time string for the event start time (e.g.
"2025-09-15T09:00:00.000Z").UUID of the user who will manage this event. Returns
400 if omitted.Optional description of the event.
Duration in minutes. Defaults to
60 if not provided.Ticket price as a decimal string (e.g.
"15.00"). Defaults to "0".Maximum attendee count. Omit or leave blank for no cap.
Listing visibility. Defaults to
"publico".String boolean. Set to
"true" to enable IP-based access restriction.Optional cover image. Accepted formats:
image/jpeg, image/png, image/webp. Maximum size: 5 MB. The image is resized to 1200×800, converted to WebP at 80% quality, and uploaded to Supabase storage.Phone number for mobile transfer payment instructions.
Account ID for payment instructions.
Bank name for payment instructions.
| Status | Code | Description |
|---|---|---|
400 | — | Missing required field (title, date, tenantId, spaceId, or managerId). |
400 | — | Image exceeds 5 MB or is an unsupported format. |
401 | — | No valid session cookie present. |
409 | CONF_001 | The requested space is already booked during the specified time window. |
GET /api/events/{id}
Returns a single event by its UUID, including the relatedspace object.
Authentication: Not required.
UUID of the event to retrieve.
PUT /api/events/{id}
Updates an existing event. Accepts eithermultipart/form-data (to replace the cover image) or application/json (for field-only updates). All fields are optional — only provided fields are updated.
If spaceId, date, or duration is included in the update payload, the conflict check runs again (excluding the current event from the comparison).
Authentication: Required (session cookie). Returns 401 if no valid session is present.
UUID of the event to update.
Updated title. Triggers slug regeneration.
Updated description.
New start date-time (ISO 8601). Triggers conflict check.
New duration in minutes. Triggers conflict check.
Updated ticket price.
New space UUID. Triggers conflict check.
Updated attendee cap.
Updated visibility setting.
Updated approval status.
Updated IP protection flag.
UUID of the new manager.
Updated payment phone.
Updated payment account ID.
Updated payment bank name.
Replacement cover image (
multipart/form-data only). Same size and format rules as POST.| Status | Code | Description |
|---|---|---|
401 | — | No valid session cookie. |
409 | CONF_001 | Space conflict detected after applying the new spaceId, date, or duration. |
DELETE /api/events/{id}
Permanently deletes an event by its UUID. Authentication: Required (session cookie). Returns401 if no valid session is present.
UUID of the event to delete.
| Status | Description |
|---|---|
401 | No valid session cookie present. |