Skip to content

Events API

Real-time event feed, detail, time-window and area filtering, event type filtering, geo-sorting, and cache/polling support.

Status

GET /api/v1/events, GET /api/v1/events/:id, GET /api/v1/events/poll, GET /api/v1/events/dashboard, and GET /api/v1/areas are implemented. See Places API and Tours API for their respective dashboard endpoints.


List Events

http
GET /api/v1/events

Real-time events listing, sorted by start time. Supports all filters via query parameters.

Query Parameters

ParameterTypeDescription
windowtoday | tonight | this_week | weekend | this_month | this_yearConvenience time-window preset
fromISO 8601Start of custom time range
toISO 8601End of custom time range
event_typeinteger | stringFilter by event type ID or slug
areaintegerFilter by numeric area / town ID
latnumberLatitude for sort=distance
lngnumberLongitude for sort=distance
sorttime | distanceSort order (default: time)
pagenumber1-based page number (default: 1)
limitnumberResults per page (default: 20, max: 100)

Date-range, area, event-type, and sort filters can be combined. When window is present, it takes precedence over custom from / to values. Related: KUB-131, KUB-133, KUB-134, KUB-137.

Response

json
{
	"data": [
		{
			"id": "101",
			"title": "Carnival Road March",
			"slug": "carnival-road-march",
			"summary": null,
			"starts_at": "2025-02-10T08:00:00.000Z",
			"ends_at": null,
			"is_all_day": false,
			"timezone": "America/Dominica",
			"event_type": { "id": "1", "name": "Festivals", "slug": "festivals" },
			"area": { "id": "1", "name": "Roseau", "slug": "roseau" },
			"place": null
		}
	],
	"meta": { "page": 1, "limit": 20, "total": 2 }
}

Related: KUB-136, KUB-137.


Cache Validation and Polling

List and poll responses include ETag and Last-Modified headers.

For real-time polling clients, use the dedicated poll endpoint:

http
GET /api/v1/events/poll

The poll endpoint accepts the same query parameters as GET /api/v1/events and returns the same response body shape on 200 OK. Check response status:

  • 304 Not Modified — feed unchanged since last poll
  • 200 OK — the current page payload is returned together with updated cache validators

Successful and 304 responses both include the standard X-RateLimit-* headers.

Related: KUB-135.


Event Detail

http
GET /api/v1/events/:id

Full event detail.

Detail responses include Cache-Control, ETag, and Last-Modified headers.

Response

json
{
	"data": {
		"id": "101",
		"title": "Carnival Road March",
		"slug": "carnival-road-march",
		"summary": null,
		"description": null,
		"status": "published",
		"starts_at": "2025-02-10T08:00:00.000Z",
		"ends_at": null,
		"is_all_day": false,
		"timezone": "America/Dominica",
		"source_reference": null,
		"cover_image_url": null,
		"created_at": null,
		"updated_at": "2025-01-15T12:00:00.000Z",
		"area": { "id": "1", "name": "Roseau", "slug": "roseau" },
		"place": null,
		"event_type": { "id": "1", "name": "Festivals", "slug": "festivals" }
	}
}

Related: KUB-132.


Areas Listing

http
GET /api/v1/areas

List of all areas / towns used across events and places.

Response

json
{
	"data": [
		{ "id": "1", "name": "Roseau", "slug": "roseau" },
		{ "id": "2", "name": "Portsmouth", "slug": "portsmouth" }
	]
}

Cacheable. Related: KUB-133.


Events Dashboard

http
GET /api/v1/events/dashboard

Returns four aggregate sections for the events surface.

Authentication

Optional. Signed-in callers may authenticate with either a bearer JWT or a valid Better Auth session cookie to receive the higher dashboard rate-limit budget.

Rate Limits

Caller typeRequests / minute
Unauthenticated30
Authenticated120

Response 200 OK

json
{
	"data": {
		"categories": [
			{ "id": "1", "name": "Festivals", "slug": "festivals", "event_count": 12 }
		],
		"featured_events": [
			{
				"id": "101",
				"title": "Carnival Road March",
				"slug": "carnival-road-march",
				"summary": "Annual Dominica Carnival celebration",
				"starts_at": "2025-02-10T08:00:00.000Z",
				"ends_at": null,
				"is_all_day": false,
				"timezone": "America/Dominica",
				"area": null,
				"place": null
			}
		],
		"this_week": [],
		"this_month": []
	}
}

Response Sections

SectionLimitDescription
categoriesallActive event type categories with published event count.
featured_events10Upcoming published events ordered by start time ascending.
this_week20Published events starting within the next 7 days.
this_month20Published events starting within the next 30 days.

Response 429 Too Many Requests

Returned when the caller exceeds the dashboard rate limit. Successful and rate-limited responses include the standard X-RateLimit-* headers.


Built with VitePress