---
title: "Hand a taken-over portal back, so it rebuilds itself again."
method: POST
path: "/spaces/{idOrSlug}/portal/reset"
tags: ["Client spaces"]
---

# Hand a taken-over portal back, so it rebuilds itself again.

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

## Request

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

Undoes portal/customize. The portal keeps its link and address, is rebuilt from the space straight away (replacing any hand edits), and from then on updates whenever a page is published into the space.

## Response `200`

Managed again; managed=true.

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