Skip to main content
Fetch Space
Fetches a space by UUID. Returns full space details including membership permissions for the viewer (the signed-in user, or the user a service key names in actingUserId), parent space, and child space previews. A space the viewer can’t see — a private space they aren’t an active member of, or a space under one — answers 404 space/not-found, exactly like one that doesn’t exist. parentSpace is null when the viewer can’t see the parent, childSpaces lists the direct sub-spaces the viewer can see that are public or that the viewer is an active member of, and childSpacesCount counts exactly those. See Space visibility. memberPermissions is always present and reports what the viewer may do there, also for a user with no membership, a signed-out caller and a service key naming nobody (the last two get the anonymous view): canRead follows the reading rules of the spaces above it, and canPost also needs no ban in the space or above it and a postingPermission that lets them post. See How permissions are calculated.

Path Parameters

string
required
UUID of the space.

Query Parameters

string
Service key only: the user to read as. The response is exactly what that user’s own access token would get (their role, memberPermissions and membership). Leave it out for the anonymous view. A user token always acts as its own user and must not send it, and neither may a request with no credentials (400 space/acting-user-not-allowed).
string
Associations to include, as a comma-separated value or repeated params. The only value is:
  • files — the processed avatarFile and bannerFile objects (requires the files-images bundle)
Matching ignores case. An unknown value returns 400 space/invalid-query.

Response

Returns a SpaceDetailed object including memberPermissions (always present), parentSpace, and childSpaces.

Error Responses

Returned when spaceId isn’t a valid UUID. Checked before sign-in, permissions and the endpoint’s other checks.
The space doesn’t exist, or the viewer can’t see it.
Returned with code space/invalid-query for an unknown include value.
A user token, or a request with no credentials, sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
Returned when a service key names an actingUserId that isn’t a user in this project.
See also: useFetchSpace