---
title: "Take over the portal HTML. Regeneration stops until it is handed back."
method: POST
path: "/spaces/{idOrSlug}/portal/customize"
tags: ["Client spaces"]
---

# Take over the portal HTML. Regeneration stops until it is handed back.

`POST /spaces/{idOrSlug}/portal/customize`

## Request

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

After this, the portal is an ordinary page the owner (or an agent) edits with update_site, and membership changes no longer touch it, with one exception: put <!-- stacktree:documents --> where the list goes and the document list between it and <!-- /stacktree:documents --> is rewritten on every change to the space (see https://stacktr.ee/docs#portal-design). POST /spaces/{idOrSlug}/portal/reset undoes it.

## Response `200`

Customized; managed=false from now on.

- object
  - `ok` boolean, required

## Other responses

- `400`: Portal not enabled.
- `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)
