Skip to main content
POST
/
:projectId
/
api
/
v7
/
events
/
:eventId
/
hosts
Add Host
curl --request POST \
  --url https://api.sublay.io/api/v6/:projectId/api/v7/events/:eventId/hosts \
  --header 'Content-Type: application/json' \
  --data '
{
  "userId": "<string>"
}
'
Adds a user to the event’s hostIds. Host-only — the caller must already be a host (service/master keys bypass this). The operation is idempotent (adding an existing host is a no-op) and takes a row-level lock to serialize concurrent host changes. There is no requirement that the target be a space member or invitee — any user can be made a host.

Path Parameters

eventId
string
required
UUID of the event.

Body Parameters

userId
string
required
The user to grant host on the event.

Response

Returns the updated Event with the new hostIds.

Error Responses

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