Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/HelenaLM32/ECHO/llms.txt

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

The events API lets organizers create and manage cultural events tied to registered ECHO venues. All GET endpoints are public and require no authentication. Creating or updating events requires a valid Bearer token in the Authorization header. See Authenticate with the ECHO API for details on obtaining a token.
The base URL for all endpoints on a local development server is http://localhost:8084. Replace this with your deployed API URL in production.

Get all events

GET /events
Returns a list of all events on ECHO. This endpoint is public and requires no authentication.

Example

curl -X GET http://localhost:8084/events

Response fields

id
number
required
Unique identifier for the event.
venueId
number
required
ID of the venue where the event takes place.
title
string
Display title of the event.
description
string
Full description of the event.
startDate
string
required
Event start date and time in ISO 8601 format (e.g., 2025-09-15T18:00:00).
endDate
string
required
Event end date and time in ISO 8601 format.
precio
number
Ticket price. Omitted if the event is free.
categoria
string
Event category (e.g., Ilustración, Música, Teatro).
URL where attendees can purchase tickets.
img
string
URL of the event cover image.

Get events by creator

GET /events/user/{userId}
Returns all events created by a specific user. This endpoint is public.

Path parameters

userId
number
required
The numeric ID of the event creator.

Example

curl -X GET http://localhost:8084/events/user/7

Get events at a venue

GET /events/venue/{venueId}
Returns all events scheduled at a specific venue. This endpoint is public.

Path parameters

venueId
number
required
The numeric ID of the venue.

Example

curl -X GET http://localhost:8084/events/venue/3

Get event by ID

GET /events/{id}
Returns a single event record by its numeric ID. This endpoint is public.

Path parameters

id
number
required
The numeric ID of the event to retrieve.

Example

curl -X GET http://localhost:8084/events/21

Error codes

StatusMeaning
404No event exists with the given ID.

Create event

POST /events
Creates a new event linked to an existing venue. The request must use multipart/form-data encoding to support cover image upload. Authentication is required.
Dates must be formatted as yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss. The seconds component is optional. Example: 2025-09-15T18:00.

Form parameters

venueId
number
required
The numeric ID of the venue where the event will take place. The venue must already exist on ECHO.
startDate
string
required
Event start date and time. Format: yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss.
endDate
string
required
Event end date and time. Must be after startDate. Format: yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss.
title
string
Display title of the event.
description
string
Full description shown to attendees on the event page.
precio
number
Ticket price as a decimal number (e.g., 10.00). Omit for free events.
categoria
string
Category label for the event (e.g., Ilustración, Música, Teatro).
URL where attendees can purchase tickets.
img
file
Cover image file for the event banner.

Example

curl -X POST http://localhost:8084/events \
  -H "Authorization: Bearer <token>" \
  -F "venueId=3" \
  -F "startDate=2025-09-15T18:00" \
  -F "endDate=2025-09-15T22:00" \
  -F "title=Exposición de Ilustración Digital" \
  -F "description=Muestra de ilustradores emergentes de Barcelona" \
  -F "precio=10.00" \
  -F "categoria=Ilustración" \
  -F "linkEntradas=https://tickets.example.com/expo-ilustracion" \
  -F "img=@/path/to/event-banner.jpg"

Error codes

StatusMeaning
400Missing required fields, invalid date format, or endDate is before startDate.
401No valid authentication token provided.
404The specified venueId does not exist.

Update event

PUT /events/{id}
Replaces an event record with the provided data. Uses multipart/form-data to allow cover image replacement. Authentication is required.

Path parameters

id
number
required
The numeric ID of the event to update.

Form parameters

venueId
number
Updated venue ID. The venue must already exist on ECHO.
startDate
string
Updated start date and time. Format: yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss.
endDate
string
Updated end date and time. Format: yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss.
title
string
Updated event title.
description
string
Updated event description.
precio
number
Updated ticket price.
categoria
string
Updated category label.
Updated ticket purchase URL.
img
file
Replacement cover image file.

Example

curl -X PUT http://localhost:8084/events/21 \
  -H "Authorization: Bearer <token>" \
  -F "title=Exposición de Ilustración Digital — Edición Especial" \
  -F "precio=15.00"

Error codes

StatusMeaning
400Invalid date format or endDate is before startDate.
401No valid authentication token provided.
403Not authorized to update this event.
404No event exists with the given ID.

Build docs developers (and LLMs) love