The
spaces functions are currently in BETA. The API may change without notice. A one-time warning is emitted on first use.List Spaces
Create a Space
SetisPrivate to create a private space. Private spaces are only visible to their members and to account, organization, and space admins. It defaults to false (public). When isPrivate is true, an advisory warning is emitted on every call reminding you to add members before the space becomes inaccessible to other users.
Get a Space
Update a Space
PassisPrivate to change a space’s visibility: true makes it private (visible only to members and admins); false makes it public. Omit it to preserve the existing visibility. Setting isPrivate: true emits the same advisory warning as createSpace on every call.
Delete a Space
Add a User to a Space
Uses upsert semantics — if the user is already a member, their role is updated. The user must already be a member of the space’s parent organization. Requires space admin role orROLE_BINDING_CREATE permission.
Remove a User from a Space
Removes the user’s space membership and all RBAC role bindings on the space. Requires space admin role orROLE_BINDING_DELETE permission.