Skip to main content

Overview

useAddHost returns a callable that adds a user to an event’s hostIds. Owner-only: the logged-in user 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. For an event in a space, the new host must be an active member of it (409 event/host-not-member). The operation is idempotent.

Usage Example

Parameters

string
required
The event ID.
string
required
The user to make a host. For an event in a space, an active member of it.

Returns

Returns a Promise<Event> — the Event with the new hostIds.

See Also