Skip to main content
POST
/
:projectId
/
api
/
v7
/
events
/
:eventId
/
invites
Add Invite
curl --request POST \
  --url https://api.sublay.io/api/v6/:projectId/api/v7/events/:eventId/invites \
  --header 'Content-Type: application/json' \
  --data '
{
  "userId": "<string>"
}
'
Creates an EventInvite for a user. Host-only (service/master keys bypass the check). The invite is keyed on a Sublay userId (never a foreign ID) and is idempotent against the unique (eventId, userId) constraint — re-inviting an already-invited user is a no-op success. For an invite-visibility event, the invited user can now see and RSVP to the event. When the notifications bundle is present, the invitee receives an event-invite notification (best-effort).

Path Parameters

eventId
string
required
UUID of the event.

Body Parameters

userId
string
required
The user to invite.

Response

Returns the updated Event.

Error Responses

{ "error": "Event not found", "code": "event/not-found" }
{ "error": "Only a host of this event may manage its invites.", "code": "event/forbidden" }
See also: useAddInvite