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. TheactingUserId 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.
When the event starts: an ISO 8601 datetime in UTC (ending in
Z), or a Date (sent as its ISO string).Event format.
online requires url; physical requires address or location; hybrid requires both.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.Additional host user IDs (the creator is always added). For an event in a space, each must be an active member of it.
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.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. PassactingUserId 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.
Associations to expand, as a single value or an array:
"user", "space", "files", "userRsvp".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.Promise<Event>
fetchManyEvents
Lists events with visibility enforced, plus filtering, sorting, geo, and free-text search. PassactingUserId 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.
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.Sort direction. Left out, the sort’s natural direction: soonest first for
"startTime", most going first for "going".Only this space’s events, or
"none" for events not in any space. Left out: every event.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.Associations to expand, as a single value or an array:
"user", "space", "files", "userRsvp".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.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.
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.
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.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).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.Promise<Event>
cancelEvent
Cancels an event (setsstatus: "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).
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.
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’seventDeletion 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.
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.
Promise<void>
setRsvp
Sets or changes a user’s RSVP. Transitions intogoing 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.
The user the service key acts as, who RSVPs, held to their own event visibility (an event they can’t see returns
404).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 answers404 if they can’t. It sends DELETE /events/:eventId/rsvp with actingUserId in the query and no body.
The user the service key acts as, whose RSVP is withdrawn, held to their own event visibility.
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).
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.
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.
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.
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.
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.
Promise<Event>
removeInvite
Removes a user’s invite, revoking their access to aninvite 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.
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.
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 (otherwise403 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.
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.
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.Promise<PaginatedResponse<EventInvite>>
fetchEventRsvps
Named RSVP (guest) list. Returns paginated EventRsvp records with the user populated. Visible to anyone who can see the event whenguestListVisible 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.
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.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.
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.Promise<PaginatedResponse<EventRsvp>>
