---
title: "Rename a team — persists to config, applied on next regen"
method: POST
path: "/context-documents/teams/rename"
tags: ["Context Documents"]
---

# Rename a team — persists to config, applied on next regen

`POST /context-documents/teams/rename`

Persist a team rename.

Fires no regen on its own — the rename applies to the next generated
tree. Chain-flattens on write: renaming X→Y where an existing override
K→X exists rewrites that to K→Y and still records X→Y, so future
lookups are always one hop deep.

## Request body

- TeamRenameRequest — Rename a team by its slug. Stored in `ContextDocConfig.team_overrides` and applied at two points during generation: the detection seed (so the stability mechanism remembers the rename) and the post-detection list (so any re-detected old slug is normalized back to the new one). Both `old_slug` and `new_slug` must match `[a-z0-9-]{1,64}`. `new_name` is optional — omit to keep the display name the LLM picks.
  - `old_slug` string, required — Current team slug as emitted by detection.
  - `new_slug` string, required — Replacement slug; used in file paths and seed.
  - `new_name` string, nullable — Optional display name override. Omit to let the LLM pick.

## Response `200`

Successful Response

- TeamOverridesResponse
  - `team_overrides` object, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/hyperspell/apis/hyperspell-api.md) · [All operations](https://skmtc.net/hyperspell/apis/hyperspell-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hyperspell/hyperspell-api/versions/5721acd588e6/schema)
