Skip to main content
The events module covers the full events surface: creating and editing events, the RSVP lifecycle, host and invite management, and the guest list. It maps directly to the Events API. Because the Node SDK authenticates with a service key (it acts as the whole project, not a single end user), functions that act as a user take that user in actingUserId. On the event-management functions (updateEvent, cancelEvent, deleteEvent, the host and invite functions, fetchInvitees), actingUserId is the user the call acts as (a host, the owner, or an admin or moderator of the event’s space, depending on the function), with exactly that user’s powers. On the host and invite functions, userId is the target user (the host or invitee). Requires the events bundle. Space-scoping needs the spaces bundle; the cover, images and files need files-images; notifications need notifications. The Node SDK uploads an event’s cover (coverFile), images (images) and files (files), and removes its files (removeFileIds).

createEvent

Creates an event. The actingUserId you pass becomes the event’s owner and is auto-added to hostIds. For an event in a space it’s refused when that user 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). Returns the event with inline rsvpCounts.
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
Event format. online requires url; physical requires address or location; hybrid requires both.
string
required
The user the service key acts as: the event’s creator and first host, held to their own permissions (a space-scoped event needs them to be an active member). A user that doesn’t exist returns 404 event/user-not-found.
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 the event 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 to non-hosts. Defaults to true.
string[]
Additional host user IDs (the creator is always 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: Uint8Array | Blob; filename?: string; mimeType?: string; options: ImageOptions }
The cover image, up to 50 MB. Raw bytes carry no type, so pass mimeType with a Uint8Array (image/jpeg, image/png or image/webp; without it the file goes as application/octet-stream and is refused with 400 event/unsupported-file-type); a Blob keeps its own type. options says how to process the image and must include mode (see Upload Image). With an image, the request is sent as multipart/form-data. The cover is returned in the event’s files, and coverImageId points at it.
{ files: { file: Uint8Array | Blob; filename?: string; mimeType?: string }[]; options: ImageOptions }
Images in the event’s files, up to 50 MB each, processed per options (mode is required). Pass mimeType with a Uint8Array, as for coverFile; a part without a filename is named image. A request takes at most 20 files in all. Sends multipart/form-data.
{ files: { file: Uint8Array | Blob; filename?: string; mimeType?: string }[]; options?: { pathParts?: string[] } }
Files in the event’s files, stored as uploaded (JPEG, PNG, WebP or PDF: pass mimeType with a Uint8Array), up to 50 MB each. Each file’s type comes from its MIME type; an image sent here isn’t processed, so it has no image data. A part without a filename is named file. Sends multipart/form-data.
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. Pass actingUserId to resolve visibility for that user and to populate userRsvp (with the userRsvp include). 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".
string
The user to read as: exactly what their own access token would get (visibility, userRsvp). Omit it for the anonymous view: only a public event in no space or in a space anyone can read is returned, and any other answers 404.
Returns — Promise<Event>

fetchManyEvents

Lists events with visibility enforced, plus filtering, sorting, geo, and free-text search. Pass actingUserId to resolve member/invite/host/space-team visibility and to use the myRsvp filter. Visibility applies to the rows and the totals alike. 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.
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 requester RSVP’d with: "going", "maybe" or "not-going", e.g. ["going", "maybe"]. Sent as one comma-separated value; values match exactly. Requires actingUserId.
{ 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".
string
The user to list as: exactly what their own access token would get (visibility, myRsvp, userRsvp). Omit it for the anonymous view: public events in no space or in a space anyone can read.
Returns — Promise<PaginatedResponse<Event>>

updateEvent

Edits an event’s mutable fields. Host-only (403 event/forbidden): actingUserId 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.
string
required
The event ID.
string
required
The user the call acts as: one of the event’s hosts. It has exactly their powers on the event, and the action is recorded as theirs.
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 (re-validates location fields).
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: Uint8Array | Blob; filename?: string; mimeType?: string; options: ImageOptions }
A new cover image, replacing the current one, whose file is deleted (up to 50 MB). Raw bytes carry no type, so pass mimeType with a Uint8Array (image/jpeg, image/png or image/webp; without it the file goes as application/octet-stream and is refused with 400 event/unsupported-file-type); a Blob keeps its own type. options says how to process the image and must include mode (see Upload Image). With an image, the request is sent as multipart/form-data.
{ files: { file: Uint8Array | Blob; filename?: string; mimeType?: string }[]; options: ImageOptions }
Images appended after the event’s existing files, up to 50 MB each, processed per options (mode is required). Pass mimeType with a Uint8Array, as for coverFile; a part without a filename is named image. A request takes at most 20 files in all. Sends multipart/form-data.
{ files: { file: Uint8Array | Blob; filename?: string; mimeType?: string }[]; options?: { pathParts?: string[] } }
Files appended after the event’s existing files, stored as uploaded (JPEG, PNG, WebP or PDF: pass mimeType with a Uint8Array), up to 50 MB each. Each file’s type comes from its MIME type; an image sent here isn’t processed, so it has no image data. A part without a filename is named file. Sends multipart/form-data.
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. actingUserId must be the event’s owner (also when they are no longer an active member of its space) or an active admin or moderator 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.
string
required
The user the call acts as: the event’s owner, an admin or moderator of its space, or, on an event whose owner’s account was deleted, one of its hosts. It has exactly their powers on the event, and the action is recorded as theirs.
Returns — Promise<Event | { id: string; status: "cancelled" }>: the cancelled event, or only { id, status } when actingUserId can’t see the event (for example its owner who is no longer an active member of its space).

deleteEvent

Permanently (or soft-, per the project’s eventDeletion settings) deletes an event and cleans up its RSVPs and invites. actingUserId must be one of the users who may cancel it: the event’s owner, an active admin or moderator of its space, or, when the owner’s account was deleted, one of its hosts.
string
required
The event ID.
string
required
The user the call acts as: the event’s owner, an admin or moderator of its space, or, on an event whose owner’s account was deleted, one of its hosts. It has exactly their powers on the event, and the action is recorded as theirs.
Returns — Promise<void>

setRsvp

Sets or changes a 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.
string
required
The user the service key acts as, who RSVPs, held to their own event visibility (an event they can’t see returns 404).
Returns — Promise<Event> (with refreshed rsvpCounts)

withdrawRsvp

Removes a 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. It sends DELETE /events/:eventId/rsvp with actingUserId in the query and no body.
string
required
The event ID.
string
required
The user the service key acts as, whose RSVP is withdrawn, held to their own event visibility.
Returns — Promise<Event | { id: string; userRsvp: null }>: the event, or only { id, userRsvp: null } when actingUserId can no longer see it.

addHost

Makes a user a host. Owner-only: actingUserId 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 the call acts as: the event’s owner. It has exactly their powers on the event, and the action is recorded as theirs.
string
required
The user to make a host.
Returns — Promise<Event>

removeHost

Removes a host. Removing another host is owner-only (actingUserId is 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 id as both userId and actingUserId, 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: the host in the path, actingUserId in the query, no body.
string
required
The event ID.
string
required
The user the call acts as: the event’s owner, or the host stepping down. It has exactly their powers on the event, and the action is recorded as theirs.
string
required
The host to remove, or actingUserId itself to step down.
Returns — Promise<Event | { id: string }>: the event, or only { id } after stepping down from an event actingUserId can no longer see.

addInvite

Invites a user to the event. Host-only: actingUserId 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 (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 the call acts as: one of the event’s hosts. It has exactly their powers on the event, and the action is recorded as theirs.
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. It sends DELETE /events/:eventId/invites/:userId: the invitee in the path, actingUserId in the query, no body.
string
required
The event ID.
string
required
The user the call acts as: one of the event’s hosts. It has exactly their powers on the event, and the action is recorded as theirs.
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.
string
required
The user the call acts as: one of the event’s hosts, or an admin or moderator of its space. It has exactly their powers on the event, and the action is recorded as theirs.
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; otherwise 403 event/guest-list-hidden. Pass actingUserId to read as that user. 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.
string
The user to read as: exactly what their own access token would get (event visibility, whether they host it). Omit it for the anonymous view.
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>>