Skip to main content

Overview

useCreateWorkspace returns a callable that creates a workspace. The signed-in caller becomes the owner. Omit parentWorkspaceId for a root workspace (requires a verified email); pass it for a child (requires the create-sub-workspace capability on the parent).
The verified-email gate on root creation is absolute — there is no server-side escape hatch. A service or master key acting as a named user via the node SDK is held to the same rule, exactly as accepting an invite and receiving an ownership transfer are. Prompt the user through email verification before showing a “Create workspace” flow.

Usage Example

Parameters

string
required
Display name. 1–100 characters.
Record<string, any>
Optional opaque developer data.
string | null
Optional parent for child creation. Absent/null → root.

Returns

Returns the created Workspace object.

Error codes