> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperspell.com/llms.txt
> Use this file to discover all available pages before exploring further.

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

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



## OpenAPI

````yaml https://app.stainlessapi.com/api/spec/documented/hyperspell.yaml post /context-documents/teams/rename
openapi: 3.1.0
info:
  title: Hyperspell API
  summary: >-
    Hyperspell is the memory layer for AI apps and agents. Through the API, you
    can add memories, connect data sources to index them in real-time, and
    search memories with our natural language query engine.
  termsOfService: https://hyperspell.com/blog/tos
  contact:
    name: Hyperspell
    url: https://hyperspell.com/
    email: hello@hyperspell.com
  version: 0.32.1
servers:
  - url: https://api.hyperspell.com
    description: Production
security:
  - APIKey: []
    AsUser: []
paths:
  /context-documents/teams/rename:
    post:
      tags:
        - Context Documents
      summary: Rename a team — persists to config, applied on next regen
      description: |-
        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.
      operationId: rename_team_context_documents_teams_rename_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamRenameRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamOverridesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKey: []
        - AsUser: []
components:
  schemas:
    TeamRenameRequest:
      properties:
        old_slug:
          type: string
          title: Old Slug
          description: Current team slug as emitted by detection.
        new_slug:
          type: string
          title: New Slug
          description: Replacement slug; used in file paths and seed.
        new_name:
          anyOf:
            - type: string
            - type: 'null'
          title: New Name
          description: Optional display name override. Omit to let the LLM pick.
      type: object
      required:
        - old_slug
        - new_slug
      title: TeamRenameRequest
      description: |-
        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.
    TeamOverridesResponse:
      properties:
        team_overrides:
          additionalProperties:
            additionalProperties:
              type: string
            type: object
          type: object
          title: Team Overrides
      type: object
      required:
        - team_overrides
      title: TeamOverridesResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKey:
      type: http
      description: >-
        API Key or JWT User Token. If using an API Key, set the X-As-User header
        to act as a specific user. A JWT User Token is always scoped to a
        specific user.
      scheme: bearer
      bearerFormat: Bearer <token>
    AsUser:
      type: apiKey
      description: >-
        Optionally set this header to act as a specific user when using an API
        Key, equivalent to first exchanging the API Key for a User Token
      in: header
      name: X-As-User

````