Overview
useCreateSpace returns a callable function for creating a new space. The request can include avatar and banner image uploads. The creator is automatically added as an admin.
Usage Example
Parameters
Display name for the space. 3–100 characters.
Optional URL slug. Must be unique per project. Supports letters, numbers, hyphens, and underscores (Unicode allowed).
Optional description. Up to 1,000 characters.
Optional avatar image to upload. The
options object controls format, quality, dimensions, and variants.Optional banner image to upload.
Who can read content. Defaults to
"anyone".Who can post entities. Defaults to
"members".Whether new members must be approved. Defaults to
true.Optional custom metadata. Up to 1 MB.
Optional UUID of a parent space. The creator must be an admin of the parent space.
Returns
Returns the created Space object.When creating a child space, all admins and moderators of the parent space are automatically added to the new child space with their same roles.

