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. Passcover and/or gallery to upload images inline (the request is sent as multipart/form-data).
Event title. 1–300 characters.
ISO datetime when the event starts.
online requires url; physical requires address or location; hybrid requires both.Optional description.
Optional ISO end datetime.
Optional IANA timezone.
Join/stream URL.
Venue name.
Street address.
Coordinates for proximity search.
Scope to a space. Required when
visibility is "members".Defaults to
"public".Max
going RSVPs. Omit for unlimited.Allow
"maybe" RSVPs. Defaults to true.Expose the named guest list. Defaults to
true.Additional host user IDs (the logged-in user is auto-added).
Arbitrary key-value data. Up to 1 MB.
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.Promise<Event>
fetchEvent
Fetches a single event by ID. Visibility anduserRsvp are resolved from the logged-in user’s token.
The event ID.
Comma-separated associations:
"user", "space", "files", "userRsvp".Promise<Event>
fetchManyEvents
Lists events with visibility enforced, plus filtering, sorting, geo, and free-text search. ThemyRsvp filter and userRsvp enrichment use the logged-in user.
Page number (1-indexed). Defaults to
1.Results per page. Capped at
100.Sort field. Defaults to
"startTime".Sort direction. Defaults to
"asc".Derived time window.
ISO datetime lower bound on
startTime.ISO datetime upper bound on
startTime.Restrict to one space.
Only events this user hosts.
Filter by type.
Defaults to
"active".Comma-separated statuses the logged-in user RSVP’d with, e.g.
"going,maybe".Proximity filter (radius in meters).
Free-text filter on
title.Free-text filter on
description.Comma-separated associations.
Promise<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.The event ID.
New title.
New description.
New ISO start datetime.
New ISO end datetime.
New timezone.
New type.
New URL.
New venue name.
New address.
New coordinates.
New visibility.
New capacity.
Allow
"maybe" RSVPs.Expose the guest list.
New metadata.
Promise<Event>
cancelEvent
Cancels an event (setsstatus: "cancelled"). Host-only. The event stays fetchable but rejects new RSVPs.
The event ID.
Promise<Event>
deleteEvent
Deletes an event (soft or hard per the project’seventDeletion settings). Host-only.
The event ID.
Promise<void>
setRsvp
Sets or changes the logged-in user’s RSVP. Transitions intogoing are capacity-checked.
The event ID.
The RSVP response.
Promise<Event> (with refreshed rsvpCounts)
withdrawRsvp
Removes the logged-in user’s RSVP. Idempotent.The event ID.
Promise<Event>
addHost
Grants a user host privileges. Host-only. TheuserId is the target host.
The event ID.
The user to grant host on the event.
Promise<Event>
removeHost
Revokes a user’s host privileges. Host-only. Rejected if it would leave the event with no hosts.The event ID.
The host to remove.
Promise<Event>
addInvite
Invites a user to the event. Host-only. Idempotent. TheuserId is the target invitee.
The event ID.
The user to invite (userId only — never a foreign ID).
Promise<Event>
removeInvite
Removes a user’s invite, revoking their access and dropping their RSVP. Host-only.The event ID.
The invitee to remove.
Promise<Event>
fetchInvitees
Host-only invitee (guest) list. Returns paginated EventInvite records with the invited user populated.The event ID.
Page number (1-indexed).
Results per page. Capped at
100.Promise<PaginatedResponse<EventInvite>>
fetchEventRsvps
Named RSVP (guest) list. Returns paginated EventRsvp records with the user populated. Visible to hosts always, to any viewer whenguestListVisible is true. RSVP counts themselves are public via the event’s rsvpCounts.
The event ID.
Comma-separated statuses to filter by, e.g.
"going,maybe". Omit for all.Page number (1-indexed).
Results per page. Capped at
100.Promise<PaginatedResponse<EventRsvp>>
