Skip to main content
GET
Fetch Many Events
Returns a paginated list of events. The server-side visibility predicate is always applied: anonymous callers see only public events; authenticated callers additionally see members events of spaces they belong to, invite events they were invited to, and any event they host. Service/master keys see everything. Each event includes inline rsvpCounts, and—with the userRsvp include and an authenticated caller—the caller’s own userRsvp. Authentication is optional (optionalUserAuth). Several filters interact with the caller’s identity (myRsvp, userRsvp).

Query Parameters

number
Page number (1-indexed). Defaults to 1.
number
Results per page. Capped at 100. Defaults to 10.
string
"startTime" (chronological) or "going" (by going-RSVP count). Defaults to "startTime".
string
"asc" or "desc". Defaults to "asc".
string
Derived time window: "upcoming" (startTime in the future), "ongoing" (started, has an endTime, not yet ended), or "past". Events without an endTime become past once they start.
string
ISO datetime. Only events starting after this. ANDed with timeWindow.
string
ISO datetime. Only events starting before this.
string
Restrict to events scoped to this space. Omit for all scopes.
string
Only events hosted by this user (array containment on hostIds).
string
Filter by "online", "physical", or "hybrid".
string
"active" or "cancelled". Defaults to "active".
string
Comma-separated RSVP statuses the caller responded with, e.g. "going,maybe". Requires an authenticated caller (or a service/master key passing userId); otherwise returns 400.
object
Proximity filter { latitude, longitude, radius } (radius in meters). Uses ST_DWithin.
object
Free-text filter on title: { hasTitle?, includes?, doesNotInclude? }. includes/doesNotInclude accept a string or array.
object
Free-text filter on description: { hasDescription?, includes?, doesNotInclude? }.
string
Comma-separated associations to expand: "user", "space", "files", "userRsvp".
string
The requester id. Used for the myRsvp filter, userRsvp enrichment, and visibility resolution. For non-privileged callers the server infers this from the auth token; service/master keys may pass it explicitly.

Response

Returns a paginated response: { data: Event[], pagination: { page, limit, totalItems, hasMore, ... } }. See Event.

Error Responses

See also: useFetchManyEvents · useFetchManyEventsWrapper