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

# Rename a workspace

> Change the display name of a workspace.

Requires an OAuth bearer token and Admin or Owner access to that workspace. Use its `tenant_id`, not a group ID. The public ID and numeric ID stay unchanged. Empty names return `400`, duplicate names `409`, insufficient role `403`, and a missing workspace `404`.


## OpenAPI

````yaml PATCH /api/v1/user/workspaces/{tenant_id}
openapi: 3.1.0
info:
  title: Bandwidth Agent Builder API
  version: v1
  description: >-
    Manage agents, place calls, and retrieve conversation results in your
    workspace.
servers:
  - url: https://agents.labs.bandwidth.com
    description: Workspace API
security: []
paths:
  /api/v1/user/workspaces/{tenant_id}:
    patch:
      tags:
        - workspace-management
      summary: Rename a workspace
      description: >-
        **Authorization:** Requires a Labs OAuth bearer token. API keys are not
        accepted. Resource ownership and operation-specific restrictions still
        apply.


        Change the display name of a workspace.
      operationId: rename_workspace_api_v1_user_workspaces__tenant_id__patch
      parameters:
        - in: path
          name: tenant_id
          required: true
          schema:
            title: Tenant Id
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RenameWorkspaceRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceInfo'
          description: Successful Response
        '401':
          description: Missing, invalid, or expired credential.
        '403':
          description: >-
            The account lacks access to the workspace, resource, or required
            role.
        '404':
          description: Not found
        '409':
          description: Workspace name is already in use.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - LabsAuth: []
components:
  schemas:
    RenameWorkspaceRequest:
      properties:
        name:
          title: Name
          type: string
      required:
        - name
      title: RenameWorkspaceRequest
      type: object
    WorkspaceInfo:
      properties:
        groups:
          items:
            $ref: '#/components/schemas/GroupInfo'
          title: Groups
          type: array
        public_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Public Id
        tenant_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tenant Id
        tenant_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Tenant Name
      required:
        - groups
      title: WorkspaceInfo
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    GroupInfo:
      properties:
        id:
          title: Id
          type: integer
        is_selected:
          title: Is Selected
          type: boolean
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        role:
          title: Role
          type: string
      required:
        - id
        - role
        - is_selected
      title: GroupInfo
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    LabsAuth:
      description: >-
        Bandwidth Labs OAuth access token. Uses the user's selected workspace;
        the workspace header is not required. Do not also send an API key.
        Bearer-only operations may additionally require the Labs `super_user`
        role.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.