Skip to main content
Create Space
Creates a new space. The authenticated user is automatically added as an admin. Supports optional avatar and banner image upload via multipart form data.

Body Parameters

string
required
Display name for the space: 3–100 characters after leading and trailing whitespace is trimmed. Every space has a name; leaving it out, or sending null, returns 400 space/invalid-body.
string
Optional URL slug. Must be unique per project. Supports Unicode letters, numbers, hyphens, and underscores.
string
Optional description. Up to 1,000 characters.
string
Who may read content, for your app to enforce: "anyone" or "members". Defaults to "anyone". The v7 API reports it in memberPermissions.canRead but doesn’t hide the content inside the space; see Content inside a space and the v8 rules.
string
Who may post entities, for your app to enforce: "anyone", "members", or "admins". Defaults to "members". The v7 API reports it in memberPermissions.canPost but doesn’t refuse entities that don’t match it; see Content inside a space and the v8 rules.
string
Who can find and see the space: "public", "unlisted", or "private". Defaults to "public". Independent of readingPermission. "unlisted" hides the space from discovery and search but keeps it reachable by direct link; "private" hides the space, and the spaces under it, from everyone except its active members — it answers 404 like a nonexistent space and can’t be joined. The content inside it stays readable in v7; see Content inside a space and the v8 rules. See Space visibility.
boolean
Whether new joins require approval. Defaults to true.
object
Optional arbitrary key-value data. Up to 1 MB.
string
Optional UUID of a parent space. The caller must be an admin of the parent space; when a service key creates the space for a user (userId), that user must be.
file
Optional avatar image. Multipart form field. Requires avatarFile.options when provided.
file
Optional banner image. Multipart form field. Requires bannerFile.options when provided.

Response

Returns the created Space object with membersCount, childSpacesCount, and optional file associations.

Error Responses

Every space has a name. name was left out, sent as null, or isn’t 3–100 characters after trimming (an empty or whitespace-only name included). Over multipart, a missing name form field is the same as leaving it out.
The creator was banned in the parent space (or above) while the child space was being created.
See also: useCreateSpace