Skip to main content
POST
/
:projectId
/
api
/
v7
/
events
/
:eventId
/
rsvp
Set RSVP
curl --request POST \
  --url https://api.sublay.io/api/v6/:projectId/api/v7/events/:eventId/rsvp \
  --header 'Content-Type: application/json' \
  --data '
{
  "status": "<string>",
  "userId": "<string>"
}
'
Sets or changes the caller’s RSVP. A new RSVP is created, or an existing one is switched, and the event’s rsvpCounts are updated atomically. Requires authentication, and the caller must be able to see the event (otherwise 404). Transitions into going are capacity-checked under a row-level lock, so an event can never be oversold. Rules:
  • RSVPs close at startTime.
  • A cancelled event rejects RSVPs.
  • "maybe" is rejected when the event’s allowMaybe is false.
  • "going" (new or switched into) is rejected when rsvpCounts.going has reached capacity.

Path Parameters

eventId
string
required
UUID of the event.

Body Parameters

status
string
required
"going", "maybe", or "not_going".
userId
string
Service/master key only. RSVP on behalf of this user.

Response

Returns the Event with refreshed rsvpCounts and the caller’s userRsvp.

Error Responses

{ "error": "Event not found", "code": "event/not-found" }
{ "error": "This event has been cancelled.", "code": "event/cancelled" }
{ "error": "RSVPs are closed for this event.", "code": "event/rsvp-closed" }
{ "error": "This event does not allow a 'maybe' RSVP.", "code": "event/maybe-disabled" }
{ "error": "This event is at capacity.", "code": "event/full" }
See also: useSetRsvp