Skip to main content
The events module covers the full events surface: creating and editing events (with inline cover/gallery image upload), the RSVP lifecycle, host and invite management, and the guest list. It maps directly to the Events API. Because the JS SDK authenticates as an end user (bearer token), you never pass an actor userId — the server derives who is acting from the token. The only userId arguments are targets: the host or invitee on the host/invite functions. Requires the events bundle. Space-scoping needs the spaces bundle; images need files-images; notifications need notifications.

createEvent

Creates an event. The logged-in user becomes the creator and first host. Pass cover and/or gallery to upload images inline (the request is sent as multipart/form-data).
string
required
Event title. 1–300 characters.
string
required
ISO datetime when the event starts.
"online" | "physical" | "hybrid"
required
online requires url; physical requires address or location; hybrid requires both.
string
Optional description.
string
Optional ISO end datetime.
string
Optional IANA timezone.
string
Join/stream URL.
string
Venue name.
string
Street address.
{ latitude: number; longitude: number }
Coordinates for proximity search.
string
Scope to a space. Required when visibility is "members".
"public" | "members" | "invite"
Defaults to "public".
number
Max going RSVPs. Omit for unlimited.
boolean
Allow "maybe" RSVPs. Defaults to true.
boolean
Expose the named guest list. Defaults to true.
string[]
Additional host user IDs (the logged-in user is auto-added).
object
Arbitrary key-value data. Up to 1 MB.
{ file: Blob | File; options: ImageOptions }
Single cover image plus its processing options. Requires the files-images bundle.
Gallery image set (up to 10) plus shared processing options. Requires the files-images bundle.
ReturnsPromise<Event>

fetchEvent

Fetches a single event by ID. Visibility and userRsvp are resolved from the logged-in user’s token.
string
required
The event ID.
string
Comma-separated associations: "user", "space", "files", "userRsvp".
ReturnsPromise<Event>

fetchManyEvents

Lists events with visibility enforced, plus filtering, sorting, geo, and free-text search. The myRsvp filter and userRsvp enrichment use the logged-in user.
number
Page number (1-indexed). Defaults to 1.
number
Results per page. Capped at 100.
"startTime" | "going"
Sort field. Defaults to "startTime".
"asc" | "desc"
Sort direction. Defaults to "asc".
"upcoming" | "ongoing" | "past"
Derived time window.
string
ISO datetime lower bound on startTime.
string
ISO datetime upper bound on startTime.
string
Restrict to one space.
string
Only events this user hosts.
"online" | "physical" | "hybrid"
Filter by type.
"active" | "cancelled"
Defaults to "active".
string
Comma-separated statuses the logged-in user RSVP’d with, e.g. "going,maybe".
{ latitude: string; longitude: string; radius: string }
Proximity filter (radius in meters).
{ hasTitle?; includes?; doesNotInclude? }
Free-text filter on title.
{ hasDescription?; includes?; doesNotInclude? }
Free-text filter on description.
string
Comma-separated associations.
ReturnsPromise<PaginatedResponse<Event>>

updateEvent

Edits an event’s mutable fields. Host-only. hostIds, status, and spaceId are not editable here.
The JS SDK updateEvent accepts a flat JSON body. To curate images on update (replace the cover, append gallery photos, or remove images via removeImageIds), use the React SDK’s useUpdateEvent which supports inline multipart upload, or the underlying Update Event API directly.
string
required
The event ID.
string
New title.
string
New description.
string
New ISO start datetime.
string
New ISO end datetime.
string
New timezone.
"online" | "physical" | "hybrid"
New type.
string
New URL.
string
New venue name.
string
New address.
{ latitude: number; longitude: number }
New coordinates.
"public" | "members" | "invite"
New visibility.
number
New capacity.
boolean
Allow "maybe" RSVPs.
boolean
Expose the guest list.
object
New metadata.
ReturnsPromise<Event>

cancelEvent

Cancels an event (sets status: "cancelled"). Host-only. The event stays fetchable but rejects new RSVPs.
string
required
The event ID.
ReturnsPromise<Event>

deleteEvent

Deletes an event (soft or hard per the project’s eventDeletion settings). Host-only.
string
required
The event ID.
ReturnsPromise<void>

setRsvp

Sets or changes the logged-in user’s RSVP. Transitions into going are capacity-checked.
string
required
The event ID.
"going" | "maybe" | "not_going"
required
The RSVP response.
ReturnsPromise<Event> (with refreshed rsvpCounts)

withdrawRsvp

Removes the logged-in user’s RSVP. Idempotent.
string
required
The event ID.
ReturnsPromise<Event>

addHost

Grants a user host privileges. Host-only. The userId is the target host.
string
required
The event ID.
string
required
The user to grant host on the event.
ReturnsPromise<Event>

removeHost

Revokes a user’s host privileges. Host-only. Rejected if it would leave the event with no hosts.
string
required
The event ID.
string
required
The host to remove.
ReturnsPromise<Event>

addInvite

Invites a user to the event. Host-only. Idempotent. The userId is the target invitee.
string
required
The event ID.
string
required
The user to invite (userId only — never a foreign ID).
ReturnsPromise<Event>

removeInvite

Removes a user’s invite, revoking their access and dropping their RSVP. Host-only.
string
required
The event ID.
string
required
The invitee to remove.
ReturnsPromise<Event>

fetchInvitees

Host-only invitee (guest) list. Returns paginated EventInvite records with the invited user populated.
string
required
The event ID.
number
Page number (1-indexed).
number
Results per page. Capped at 100.
ReturnsPromise<PaginatedResponse<EventInvite>>

fetchEventRsvps

Named RSVP (guest) list. Returns paginated EventRsvp records with the user populated. Visible to hosts always, to any viewer when guestListVisible is true. RSVP counts themselves are public via the event’s rsvpCounts.
string
required
The event ID.
string
Comma-separated statuses to filter by, e.g. "going,maybe". Omit for all.
number
Page number (1-indexed).
number
Results per page. Capped at 100.
ReturnsPromise<PaginatedResponse<EventRsvp>>