Skip to main content

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.

Categories form the classification taxonomy that organizes faculty tenants and helps users filter events by discipline. Each tenant is linked to one category (e.g. "Science", "Sports", "Arts"), and each category carries a Google Material Symbols icon name that drives the UI icon. Categories are stored in the categories table with a unique name, a URL-safe slug auto-generated from the name, and an optional icon. The GET collection endpoint requires no authentication and is safe to call from public-facing pages.

GET /api/categories

Returns all categories in the system, ordered by creation date (newest first). No authentication is required.

Response 200

Returns a JSON array of category objects.
id
string
UUID of the category.
name
string
Human-readable category name (e.g. "Science", "Sports").
slug
string
URL-safe identifier auto-generated from name at creation time (e.g. "science", "sports"). Guaranteed unique across all categories.
icon
string
Google Material Symbols icon name (e.g. "science", "sports_soccer"). May be null if not set.
createdAt
string
ISO 8601 timestamp of when the category was created.
curl "https://your-domain.com/api/categories"
[
  {
    "id": "a1b2c3d4-0000-4000-8000-000000000001",
    "name": "Science",
    "slug": "science",
    "icon": "science",
    "createdAt": "2024-10-01T09:00:00.000Z"
  },
  {
    "id": "a1b2c3d4-0000-4000-8000-000000000002",
    "name": "Sports",
    "slug": "sports",
    "icon": "sports_soccer",
    "createdAt": "2024-09-20T11:30:00.000Z"
  },
  {
    "id": "a1b2c3d4-0000-4000-8000-000000000003",
    "name": "Arts & Culture",
    "slug": "arts-culture",
    "icon": "palette",
    "createdAt": "2024-08-15T16:45:00.000Z"
  }
]

Error Responses

StatusBodyReason
500{ "error": "<message>" }Unexpected database or server error. The error field contains the raw error message.

POST /api/categories

Creates a new category. The slug is automatically generated from the provided name and is guaranteed to be unique.

Request Body

name
string
required
The display name for the category. Must be unique across all categories. The slug is derived from this value.
icon
string
A Google Material Symbols icon name to represent this category in the UI (e.g. "science", "sports_soccer", "palette", "music_note"). Can be omitted.

Response 200

Returns the newly created category object.
id
string
Auto-generated UUID for the new category.
name
string
Category name as provided.
slug
string
Auto-generated URL-safe slug derived from name. Unique collision is handled automatically.
icon
string
Icon name as provided, or null if omitted.
createdAt
string
ISO 8601 creation timestamp set by the database.
curl -X POST "https://your-domain.com/api/categories" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Technology",
    "icon": "computer"
  }'
{
  "id": "a1b2c3d4-0000-4000-8000-000000000099",
  "name": "Technology",
  "slug": "technology",
  "icon": "computer",
  "createdAt": "2024-11-21T08:00:00.000Z"
}

Error Responses

StatusBodyReason
500{ "error": "<message>" }Unexpected error, including a unique-constraint violation on name.
The icon field uses Google Material Symbols names. Browse the full icon catalog at fonts.google.com/icons to find the exact string to pass. Common examples: "science", "sports_soccer", "palette", "music_note", "school", "computer", "biotech", "groups".

DELETE /api/categories/{id}

Permanently deletes a category.

Path Parameters

id
string
required
UUID of the category to delete.

Response 200

success
boolean
true when the category has been successfully deleted.
curl -X DELETE "https://your-domain.com/api/categories/a1b2c3d4-0000-4000-8000-000000000001"
{
  "success": true
}

Error Responses

StatusBodyReason
500{ "error": "<message>" }Unexpected error, including a foreign-key violation if tenants still reference this category.

Build docs developers (and LLMs) love