---
title: "List client spaces with page counts, most recently touched first."
method: GET
path: "/spaces"
tags: ["Client spaces"]
---

# List client spaces with page counts, most recently touched first.

`GET /spaces`

## Request

- Base URL: `https://api.stacktr.ee`
- URL: `https://api.stacktr.ee/spaces`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.stacktr.ee/oauth/authorize`, token URL `https://api.stacktr.ee/oauth/token`, scopes: `sites:write`, `sites:read`)

## Response `200`

OK

- object
  - `spaces` ClientSpace[]
    - `id` string, required
    - `name` string, required: Display name, e.g. "Acme Co". Renameable.
    - `slug` string, required: URL-safe identifier. Stable forever — renames never change it.
    - `hostname` string, nullable: Custom hostname bound to the space, if any.
    - `page_count` integer: Pages filed under the space.
    - `last_activity_at` integer: Unix epoch seconds of the newest page update.
    - `archived_at` integer, nullable
    - `created_at` integer

## Other responses

- `401`: Missing or invalid credentials.

---

[API](https://skmtc.dev/stacktr/apis/stacktree-api.md) · [All operations](https://skmtc.dev/stacktr/apis/stacktree-api/llms.txt) · [OpenAPI document](https://skmtc.dev/stacktr/apis/stacktree-api/revisions/5878cce46977?raw)
