Skip to main content
The events module covers the full events surface: creating and editing events (with inline cover, image and file 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 send actingUserId — 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 event’s owner and first host. For an event in a space it’s refused when the creator isn’t an active member of the space, banned in it included (403 event/not-space-member), when they’re banned in a space above it or the space’s postingPermission is "team" and they aren’t one of its admins or moderators (403 space/posting-not-allowed), or when a user in hostIds isn’t an active member of the space (409 event/host-not-member). Pass coverFile, images and/or files to upload them inline (the request is sent as multipart/form-data).
string
required
Event title. 1–300 characters.
string | Date
required
When the event starts: an ISO 8601 datetime in UTC (ending in Z), or a Date (sent as its ISO string).
"online" | "physical" | "hybrid"
required
online requires url; physical requires address or location; hybrid requires both.
string
Optional description.
string | Date
When the event ends: an ISO 8601 datetime in UTC, or a Date.
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). For an event in a space, each must be an active member of it.
object
Arbitrary key-value data. Up to 1 MB.
{ file: Blob | File; options: ImageOptions }
The cover image plus its processing options (mode is required). It is returned in the event’s files, and coverImageId points at it. Requires the files-images bundle.
{ files: (Blob | File)[]; options: ImageOptions }
Images in the event’s files, plus the processing options applied to every one (mode is required). A request takes at most 20 files in all. Requires the files-images bundle.
{ files: (Blob | File)[]; options?: { pathParts?: string[] } }
Files in the event’s files, stored as uploaded. Each file’s type comes from its MIME type; an image sent here isn’t processed, so it has no image data. Requires the files-images bundle.
Returns — Promise<Event>: the created event, with files ([] for none, the cover first) and the host’s user.avatarFile / user.bannerFile whenever the files-images bundle is installed; without the bundle, no files.

fetchEvent

Fetches a single event by ID. Visibility and userRsvp are resolved from the logged-in user’s token. The space’s active admins and moderators see every event in their space, invite events included; a host who isn’t an active member of the event’s space sees only what a regular viewer would; events in a space the viewer can’t read are hidden. See Event visibility.
string
required
The event ID.
EventIncludeParam
Associations to expand, as a single value or an array: "user", "space", "files", "userRsvp".
Returns — Promise<Event>

fetchManyEvents

Lists events with visibility enforced (rows and totals alike), plus filtering, sorting, geo, and free-text search. The space’s active admins and moderators see every event in their space, invite events included; a host who isn’t an active member of the event’s space sees only what a regular viewer would; events in a space the viewer can’t read are hidden. See Event visibility. The myRsvp filter and userRsvp enrichment use the logged-in user.
number
Page number (1-indexed). Defaults to 1.
number
Results per page: a whole number from 1 to 100. Defaults to 10. A larger value is rejected with 400 event/invalid-query, never lowered to 100.
"startTime" | "going"
Sort field. Defaults to "startTime".
"asc" | "desc"
Sort direction. Left out, the sort’s natural direction: soonest first for "startTime", most going first for "going".
"upcoming" | "ongoing" | "past"
Derived time window.
string | Date
Lower bound on startTime: an ISO 8601 datetime in UTC, or a Date.
string | Date
Upper bound on startTime: an ISO 8601 datetime in UTC, or a Date.
string | "none"
Only this space’s events, or "none" for events not in any space. Left out: every event.
string
Only events this user hosts: events whose hostIds contain them, and events they own.
"online" | "physical" | "hybrid"
Filter by type.
"active" | "cancelled"
Defaults to "active".
RsvpStatus | RsvpStatus[]
Statuses the logged-in user RSVP’d with: "going", "maybe" or "not-going", e.g. ["going", "maybe"]. Sent as one comma-separated value; values match exactly.
{ 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.
EventIncludeParam
Associations to expand, as a single value or an array: "user", "space", "files", "userRsvp".
Returns — Promise<PaginatedResponse<Event>>

updateEvent

Edits an event’s mutable fields. Host-only (403 event/forbidden): the logged-in user must be the owner or in hostIds, and, for an event in a space, an active member of that space who isn’t banned in it or a space above it (403 event/not-space-member). The space’s admins and moderators can’t edit events they don’t host. hostIds, status, and spaceId are not editable here. Pass coverFile to replace the cover, images and files to append to the event’s files, and removeFileIds to remove the event’s files. Uploads send multipart/form-data; any file operation requires the files-images bundle.
string
required
The event ID.
string
New title.
string
New description.
string | Date
New start: an ISO 8601 datetime in UTC, or a Date.
string | Date
New end: an ISO 8601 datetime in UTC, or a Date.
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.
{ file: Blob | File; options: ImageOptions }
New cover image plus its processing options — replaces the current cover, whose file is deleted.
{ files: (Blob | File)[]; options: ImageOptions }
Images to append after the event’s existing files, plus their processing options (mode is required).
{ files: (Blob | File)[]; options?: { pathParts?: string[] } }
Files to append after the event’s existing files, stored as uploaded.
string[]
Ids of the event’s files to remove: list files and/or the cover (coverImageId; removing it clears the cover). Works alone or with uploads. Any other id throws a 400 (event/invalid-remove-file-ids, with invalidIds).
"files" | "files"[]
What the response adds: "files", the event’s files as they now are (cover first) and the host’s avatar and banner files. Without it the response has no files, even after an upload or removal.
Returns — Promise<Event>

cancelEvent

Cancels an event (sets status: "cancelled"). The event stays fetchable but rejects new RSVPs. Allowed for the event’s owner (also when they are no longer an active member of its space) and for the active admins and moderators of its space; other hosts of an event that has an owner get 403 event/forbidden. When the owner’s account was deleted (userId is null), any of its hosts may cancel it — for an event in a space, only while an active member of that space who isn’t banned in it or a space above it (403 event/not-space-member otherwise).
string
required
The event ID.
Returns — Promise<Event | { id: string; status: "cancelled" }>: the cancelled event, or only { id, status } when the logged-in user can’t see the event (for example its owner who is no longer an active member of its space).

deleteEvent

Deletes an event (soft or hard per the project’s eventDeletion settings). Allowed for the same users as cancelEvent: the event’s owner and the active admins and moderators of its space, and, when the owner’s account was deleted, its hosts.
string
required
The event ID.
Returns — Promise<void>

setRsvp

Sets or changes the logged-in user’s RSVP. Transitions into going are capacity-checked. Refused with 404 event/not-found when the user can’t see the event (for example a members event once a ban ends their active membership), 403 space/posting-not-allowed when they can see it but are banned in its space or a space above it, and 403 event/not-invited on an invite event they see only as an admin or moderator of its space, without an invite.
string
required
The event ID.
"going" | "maybe" | "not-going"
required
The RSVP response.
Returns — Promise<Event> (with refreshed rsvpCounts)

withdrawRsvp

Removes the logged-in user’s RSVP, also from an event they can no longer see. Withdrawing with no RSVP succeeds and changes nothing if they can see the event, and answers 404 if they can’t.
string
required
The event ID.
Returns — Promise<Event | { id: string; userRsvp: null }>: the event, or only { id, userRsvp: null } when the logged-in user can no longer see it.

addHost

Makes a user a host. Owner-only: the logged-in user must be the event’s owner, and, for an event in a space, an active member of that space who isn’t banned in it or a space above it (403 event/not-space-member otherwise); other hosts get 403 event/forbidden. The userId is the target host, and for an event in a space must be an active member of it (409 event/host-not-member).
string
required
The event ID.
string
required
The user to make a host.
Returns — Promise<Event>

removeHost

Removes a host. Removing another host is owner-only (the owner, for an event in a space, while an active member of that space who isn’t banned in it or a space above it; 403 event/not-space-member otherwise); other hosts get 403 event/forbidden. Any host other than the owner may step down by passing their own userId, active member or not. The owner can’t step down or be removed (409 event/owner-is-host). On an event whose owner’s account was deleted, nobody can remove another host and its last host can’t step down (409 event/last-host). It sends DELETE /events/:eventId/hosts/:userId, with the host in the path and no body.
string
required
The event ID.
string
required
The host to remove, or the logged-in user to step down.
Returns — Promise<Event | { id: string }>: the event, or only { id } after stepping down from an event the logged-in user can no longer see.

addInvite

Invites a user to the event. Host-only: the owner or a user in hostIds, and, for an event in a space, an active member of that space who isn’t banned in it or a space above it (403 event/not-space-member); the space’s admins and moderators can’t (403 event/forbidden). The userId is the target invitee. Re-inviting someone already invited who can still be invited is a no-op; one who no longer qualifies gets the same 409 and keeps their invite. For an event in a space the invitee must be able to read it and not be banned in it or a space above it, and, when the space is private or members-only (or sits under such a space) or the event is members-only, be an active member of the event’s space itself; one 409 event/invitee-not-invitable covers every case.
string
required
The event ID.
string
required
The user to invite (userId only — never a foreign ID).
Returns — Promise<Event>

removeInvite

Removes a user’s invite, revoking their access to an invite event. Their RSVP is dropped only when an invite was actually removed and the user can no longer RSVP to the event: on an invite event, a host who is an active member of the event’s space keeps it, and anyone else (a space admin or moderator who isn’t a host included) loses it; on public and members events the RSVP is never touched. Host-only. It sends DELETE /events/:eventId/invites/:userId, with the invitee in the path and no body.
string
required
The event ID.
string
required
The invitee to remove.
Returns — Promise<Event>

fetchInvitees

Invitee (guest) list, open to the event’s hosts — for an event in a space, while they are active members of it and not banned in it or a space above it (otherwise 403 event/not-space-member) — and to the space’s active admins and moderators; anyone else who can see the event gets 403 event/forbidden. Returns paginated EventInvite records with the invited user populated.
string
required
The event ID.
number
Page number (1-indexed).
number
Results per page: a whole number from 1 to 100. Defaults to 10. A larger value is rejected with 400 event/invalid-query, never lowered to 100.
Returns — Promise<PaginatedResponse<EventInvite>>

fetchEventRsvps

Named RSVP (guest) list. Returns paginated EventRsvp records with the user populated. Visible to anyone who can see the event when guestListVisible is true; when it’s false, only to hosts who are active members of the event’s space and not banned in it or a space above it (any host, for an event with no space) and the space’s active admins and moderators. RSVP counts themselves are public via the event’s rsvpCounts.
string
required
The event ID.
RsvpStatus | RsvpStatus[]
Statuses to filter by: "going", "maybe" or "not-going", e.g. ["going", "maybe"]. Sent as one comma-separated value; values match exactly. Omit for all.
number
Page number (1-indexed).
number
Results per page: a whole number from 1 to 100. Defaults to 10. A larger value is rejected with 400 event/invalid-query, never lowered to 100.
Returns — Promise<PaginatedResponse<EventRsvp>>