---
title: "Enable the client portal: a generated index page of the space’s work."
method: POST
path: "/spaces/{idOrSlug}/portal"
tags: ["Client spaces"]
---

# Enable the client portal: a generated index page of the space’s work.

`POST /spaces/{idOrSlug}/portal`

## Request

- Base URL: `https://api.stacktr.ee`
- URL: `https://api.stacktr.ee/spaces/{idOrSlug}/portal`
- 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`)

Serves at the root of the space’s hostname once one is connected, and always at its own private stacktr.ee URL. Regenerates automatically on every publish into, removal from, or rename of the space. Enabling counts as ACTIVATING the space — the client-spaces plan unit (Solo 1, Studio 10, Firm unlimited); filing pages stays free on every plan. Idempotent.

## Response `201`

Enabled (or already on).

- object
  - `ok` boolean
  - `site_id` string
  - `url` string
  - `managed` boolean

## Other responses

- `402`: A plan ceiling was hit. The feature or the quota is not on this plan; the caller needs a different plan or an x402 unlock.
- `404`: Resource not found.

---

[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)
