Creating a Space can only be done when authenticated as a user, it cannot be done when authenticated as an application.
The "createSpace" mutation creates a new Space.The new space requires at least a title.
The org.opencode4workspace.builders.SpaceCreateGraphQLMutation has simple static helper methods to create a space with just a title, buildCreateSpaceMutationWithSpaceTitle(String), or with a title and members, buildCreateSpaceMutationWithSpaceTitleAndMembers(String, List<String>). Similar methods are also available from WWClient and WWGraphQLEndpoint. These will just return a Space object with the space id as their result.
For greater control, create the InputDataSenderBuilder and ObjectDataSenderBuilder manually. Create an InputDataSenderBuilder for the Space.CREATE_SPACE_MUTATION_NAME object, adding the Space title and the members you wish to assign access for the Space. A CreateSpaceFields enum is available to avoid typos. Create an ObjectDataSenderBuilder for the Space.ONE_SPACE_QUERY_OBJECT_NAME object, passing in Space fields and children. Instantiate a new SpaceCreateGraphQLMutation passing in the InputDataSenderBuilder and ObjectDataSenderBuilder as parameters. Then pass this to WWClient.createSpaceWithQuery().