Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Taykl12/Classify/llms.txt

Use this file to discover all available pages before exploring further.

The /api/calendar/events endpoint exposes two operations on calendar events. A GET request fetches every event associated with projects the authenticated user can access, ordered chronologically by event date. A POST request creates a new event within a specified project by invoking the create_evento_calendario Supabase RPC. Both operations require a valid Bearer token.

Authentication

All requests must include a valid Bearer token in the Authorization header.
Authorization: Bearer <token>

GET /api/calendar/events

Retrieves all calendar events for every project accessible to the authenticated user, sorted by fecha_evento ascending.

Request

GET /api/calendar/events
This endpoint accepts no query parameters or request body.

Response

Returns a JSON array of event objects ordered by date ascending.

Response fields

id
string
required
Unique identifier for the calendar event.
title
string
required
Display title of the event.
description
string | null
required
Optional description of the event. null when not set.
date
string
required
Date of the event in YYYY-MM-DD format.
projectName
string
required
Display name of the project this event belongs to.
projectId
string
required
Identifier of the project this event belongs to.
type
string
required
Always "event". Provided for discriminated-union client-side typing.
priority
string | undefined
Optional priority associated with the event (e.g. "Alta", "Media", "Baja"). May be undefined when not set.

Example response

[
  {
    "id": "h8i9j0k1-l2m3-4567-nopq-678901234567",
    "title": "Sprint Planning",
    "description": "Kick off Q3 sprint with the full engineering team.",
    "date": "2024-08-05",
    "projectName": "Website Redesign",
    "projectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "type": "event",
    "priority": "Alta"
  },
  {
    "id": "i9j0k1l2-m3n4-5678-opqr-789012345678",
    "title": "Stakeholder Review",
    "description": null,
    "date": "2024-08-20",
    "projectName": "Mobile App MVP",
    "projectId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "type": "event"
  }
]

Code examples

curl --request GET \
  --url https://your-app.com/api/calendar/events \
  --header "Authorization: Bearer <token>"

POST /api/calendar/events

Creates a new calendar event within a project by invoking the create_evento_calendario Supabase RPC.

Request

POST /api/calendar/events
Content-Type: application/json

Request body

projectId
number | string
required
ID of the project to associate the new event with. Accepts both numeric and UUID string formats.
title
string
required
Title of the event. Must be a non-empty string.
description
string
Optional description providing more context about the event.
priority
string
default:"Media"
Priority level for the event. Defaults to "Media" when omitted.
eventDate
string
required
Date of the event in YYYY-MM-DD format (e.g. "2024-09-10").

Example request body

{
  "projectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "title": "Design Review Session",
  "description": "Review final mockups before developer handoff.",
  "priority": "Alta",
  "eventDate": "2024-09-10"
}

Underlying RPC call

The endpoint invokes the create_evento_calendario Supabase RPC, passing projectId, title, description, priority, and eventDate as arguments.

Response

Returns HTTP 201 Created with the newly created event row as returned by Supabase.

Example response

{
  "id": "j0k1l2m3-n4o5-6789-pqrs-890123456789",
  "id_grupo": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "titulo": "Design Review Session",
  "descripcion": "Review final mockups before developer handoff.",
  "prioridad": "Alta",
  "fecha_evento": "2024-09-10",
  "created_at": "2024-07-16T09:00:00.000Z"
}

Code examples

curl --request POST \
  --url https://your-app.com/api/calendar/events \
  --header "Authorization: Bearer <token>" \
  --header "Content-Type: application/json" \
  --data '{
    "projectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "title": "Design Review Session",
    "description": "Review final mockups before developer handoff.",
    "priority": "Alta",
    "eventDate": "2024-09-10"
  }'

Error responses

StatusMeaning
400projectId, title, or eventDate is missing, or title is empty.
401Missing or invalid Authorization header / token.
500Unexpected server error or RPC failure.

Build docs developers (and LLMs) love