Skip to main content
Fetch Spaces
Fetches a paginated list of spaces. Supports filtering by search query, membership, and parent space. Authentication is optional — when provided, a list scoped to one parent space also includes the unlisted and private sub-spaces the user is an active member of.
Without parentSpaceId (or with parentSpaceId=null) this is a discovery surface: only spaces that are public themselves and have only public spaces above them are listed, for every caller. With parentSpaceId=<id>, the list shows the direct sub-spaces of that space the caller can see that are public or that the caller is an active member of — so an unlisted sub-space appears only to its members, and a private one only to its active members. memberOf=true returns the caller’s own spaces regardless of visibility. See Space visibility.

Query Parameters

number
Page number. Defaults to 1.
number
Results per page.
string
Sort order: "alphabetical", "newest", or "members". Defaults to "members".
string
Filter by slug substring.
string
Filter by name substring.
string
Filter by description substring.
string
Search across name, slug, and description simultaneously.
boolean
When true, returns only spaces where the authenticated user is an active member.
string
Filter to child spaces of a specific parent. Pass "null" for root-level spaces only. A specific parent lists the sub-spaces the caller can see that are public or that the caller is an active member of; a parent the caller can’t see lists nothing visible to them.
string
Optional comma-separated includes. Pass "files" to include avatar file objects.

Response

Space[]
Array of Space objects.
object
See also: useFetchManySpaces