Overview
useCreateEvent returns a callable that creates an event. The logged-in user becomes the creator and is auto-added to hostIds. Pass cover and/or gallery to upload images inline — the hook sends multipart/form-data automatically (requires the files-images bundle).
Usage Example
Parameters
Event title. 1–300 characters.
ISO datetime when the event starts.
online requires url; physical requires address or location; hybrid requires both.Optional description.
Optional ISO end datetime.
Optional IANA timezone.
Join/stream URL.
Venue name.
Street address.
Coordinates for proximity search.
Scope to a space. Required when
visibility is "members".Defaults to
"public".Max
going RSVPs. Omit for unlimited.Allow
"maybe" RSVPs. Defaults to true.Expose the named guest list. Defaults to
true.Additional host user IDs (the logged-in user is auto-added).
Arbitrary key-value data. Up to 1 MB.
Single cover image to upload. Sends multipart. Requires the
files-images bundle.Gallery images to upload (up to 10). Sends multipart. Requires the
files-images bundle.Returns
Returns aPromise<Event> — the created Event with inline rsvpCounts.

