spaces module covers core space lifecycle management: creating spaces, fetching them by various identifiers, updating settings, navigating parent-child hierarchies, and checking slug availability.
For membership management see Space Members, and for moderation, rules, and digest configuration see Space Moderation.
createSpace
Creates a new space.The Replyke user ID of the space creator, who becomes the initial admin.
Display name for the space.
URL-friendly identifier. Must be unique within the project. Generated from
name if omitted.Short description of the space.
Who can read content:
"anyone" (default) or "members".Who can post content:
"anyone", "members" (default), or "admins".When
true, join requests must be manually approved. Defaults to false.Makes this space a child of the specified parent space.
Arbitrary metadata attached to the space.
Promise<Space>
fetchSpace
Fetches a space by its Replyke ID, including member counts and permission details.The Replyke space ID.
Promise<SpaceDetailed>
fetchManySpaces
Fetches a paginated list of top-level spaces, with optional text search.Page number (1-indexed). Defaults to
1.Results per page. Defaults to
20.When provided, fetches children of this space instead of top-level spaces.
Text search query to filter spaces by name.
Promise<PaginatedResponse<Space>>
fetchSpaceBySlug
Fetches a space by its unique slug.The space’s URL slug.
Promise<SpaceDetailed>
fetchSpaceByShortId
Fetches a space by its short, human-readable ID (used in share URLs).The space’s short ID.
Promise<SpaceDetailed>
fetchUserSpaces
Fetches the spaces a specific user is a member of.The Replyke user ID.
Page number (1-indexed). Defaults to
1.Results per page. Defaults to
20.Promise<UserSpacesResponse>
updateSpace
Updates settings on an existing space.The Replyke space ID to update.
New display name.
New slug. Must be unique.
New description.
Updated reading permission:
"anyone" or "members".Updated posting permission:
"anyone", "members", or "admins".Updated join approval requirement.
Updated metadata. Merged with existing values.
Promise<Space>
deleteSpace
Permanently deletes a space and all its content.The Replyke space ID to delete.
Promise<DeleteSpaceResponse>
checkSlugAvailability
Checks whether a slug is available for use.The slug to check.
Promise<{ available: boolean }>
fetchChildSpaces
Fetches the direct child spaces of a given parent space.The parent Replyke space ID.
Page number (1-indexed). Defaults to
1.Results per page. Defaults to
20.Promise<PaginatedResponse<Space>>
fetchSpaceBreadcrumb
Returns the full ancestor chain from the root down to the specified space. Useful for rendering breadcrumb navigation.The Replyke space ID to get the breadcrumb for.
Promise<SpaceBreadcrumb>
