EventInvite grants a specific user access to an invite-only event. There is at most one invite per user per event (enforced by a unique (eventId, userId) constraint), so re-inviting a user who can still be invited is a no-op success. Invites are managed by hosts and always reference a Sublay userId (never a foreign ID).
Invite records are returned by the invitee-list endpoint (Fetch Invitees), open to the event’s hosts and its space’s admins and moderators.
EventInvite
Behavior
- Add —
POST /events/:eventId/inviteswith auserId. Host-only. Idempotent against the unique constraint. On an event in a space, the invitee must be able to take part in it: they must be able to read the space and not be banned in it or any space above it, and, when the space is private or members-only (or sits under such a space) or the event ismembers-only, they must be an active member of the event’s space itself. Otherwise the invite is refused with409event/invitee-not-invitable— also when re-inviting someone already invited who no longer qualifies (their existing invite is kept). When thenotificationsbundle is present, the invitee receives anevent-invitenotification. - Remove —
DELETE /events/:eventId/invites/:userId, with the invitee in the path. Host-only. Removing an invite revokes the user’s access to aninvite-only event. Their RSVP is deleted (decrementing the count) only when an invite was actually removed and the user can no longer RSVP to the event: on aninviteevent, a host who is an active member of the event’s space keeps their RSVP, and anyone else (a space admin or moderator who isn’t a host included) loses it. Onpublicandmembersevents the RSVP is never touched. - Visibility tie-in — for an
invite-visibility event, only users with an invite row and hosts can RSVP. The space’s admins and moderators can see it but can’t RSVP unless invited.

