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

# Update a workspace

> Updates a workspace's name and/or integrations. `environment` is immutable. Pass `integrations: []` to reset the workspace to expose all integrations.



## OpenAPI

````yaml /api-reference/openapi.json patch /mcp/workspaces/{id}
openapi: 3.0.0
info:
  title: RouteMCP API
  description: >-
    Unified API for integrations. Connect to multiple providers through a single
    API.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.routemcp.io/api/v1
    description: Production
security:
  - bearerAuth: []
tags: []
paths:
  /mcp/workspaces/{id}:
    patch:
      tags:
        - MCP Workspaces
      summary: Update a workspace
      description: >-
        Updates a workspace's name and/or integrations. `environment` is
        immutable. Pass `integrations: []` to reset the workspace to expose all
        integrations.
      operationId: WorkspaceController_update
      parameters:
        - name: id
          required: true
          in: path
          description: Workspace UUID.
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWorkspaceDto'
            example:
              name: Renamed Bot
              integrations:
                - github
              model: anthropic/claude-sonnet-4-6
              statelessMode: true
      responses:
        '200':
          description: Workspace updated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Workspace'
                required:
                  - data
              example:
                data:
                  id: 0191e6a2-1c4d-7a3b-9f10-2b3c4d5e6f70
                  organizationId: 0191e6a2-0000-7000-8000-000000000001
                  name: Renamed Bot
                  mode: router
                  environment: sandbox
                  allowedTools: null
                  toolkitFilter:
                    - github
                  settings: {}
                  statelessMode: false
                  status: active
                  llm:
                    configured: true
                    model: anthropic/claude-sonnet-4-6
                    verificationStatus: verified
                    verifiedAt: '2026-05-29T10:05:00.000Z'
                    updatedAt: '2026-05-29T11:00:00.000Z'
                  createdAt: '2026-05-29T10:00:00.000Z'
                  updatedAt: '2026-05-29T10:00:00.000Z'
        '404':
          description: Workspace not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    example: false
                  statusCode:
                    type: integer
                    example: 404
                    default: 404
                  message:
                    type: string
                    example: workspace <id> not found
                    default: Not Found
                  timestamp:
                    type: string
                    format: date-time
                    example: '2026-02-06T12:00:00.000Z'
                  path:
                    type: string
                    example: /api/v1/example
                required:
                  - success
                  - statusCode
                  - message
                  - timestamp
                  - path
        '422':
          description: Validation Errors.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    example: false
                  statusCode:
                    type: integer
                    example: 400
                    default: 400
                  message:
                    type: string
                    example: Validation Errors.
                    default: Validation Errors.
                  errors:
                    type: object
                    additionalProperties:
                      type: string
                    example:
                      email: email should not be empty
                  timestamp:
                    type: string
                    format: date-time
                    example: '2026-02-06T12:00:00.000Z'
                  path:
                    type: string
                    example: /api/v1/example
                required:
                  - success
                  - statusCode
                  - message
                  - errors
                  - timestamp
                  - path
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    example: false
                  statusCode:
                    type: integer
                    example: 429
                    default: 429
                  message:
                    type: string
                    example: Too Many Requests
                    default: Too Many Requests
                  timestamp:
                    type: string
                    format: date-time
                    example: '2026-02-06T12:00:00.000Z'
                  path:
                    type: string
                    example: /api/v1/example
                required:
                  - success
                  - statusCode
                  - message
                  - timestamp
                  - path
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    example: false
                  statusCode:
                    type: integer
                    example: 500
                    default: 500
                  message:
                    type: string
                    example: Internal server error.
                    default: Internal server error.
                  timestamp:
                    type: string
                    format: date-time
                    example: '2026-02-06T12:00:00.000Z'
                  path:
                    type: string
                    example: /api/v1/example
                required:
                  - success
                  - statusCode
                  - message
                  - timestamp
                  - path
      security:
        - bearerAuth: []
components:
  schemas:
    UpdateWorkspaceDto:
      type: object
      description: >-
        Partial update — send only the fields to change. `environment` is
        immutable after creation.
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
          description: New workspace display name.
          example: Renamed Bot
        integrations:
          type: array
          items:
            type: string
            enum:
              - github
              - gmail
              - hubspot
              - jira
              - monday-crm
              - notion
              - pipedrive
              - quickbooks-online
              - salesforce
              - slack
              - xero
              - zoho-books
              - zoho-crm
            example: github
          description: >-
            Toolkit slugs to expose. Pass `[]` to reset the workspace to expose
            all integrations.
          example:
            - github
        openRouterApiKey:
          type: string
          minLength: 8
          writeOnly: true
          description: >-
            Set or replace the workspace's per-workspace OpenRouter API key
            (bring-your-own LLM key). Input-only: validated, encrypted at rest,
            and NEVER returned in any response. Use `DELETE
            /mcp/workspaces/{id}/llm-key` to remove it.
          example: sk-or-v1-xxxxxxxxxxxxxxxxxxxxxxxx
        model:
          type: string
          description: OpenRouter model id in `vendor/model` format.
          example: anthropic/claude-sonnet-4-6
        statelessMode:
          type: boolean
          default: false
          description: >-
            Toggle stateless chat for this workspace. When `true`, `POST
            /mcp/{workspaceId}/chat` persists nothing and the caller must supply
            prior turns via `history`. Default `false`.
          example: false
    Workspace:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 0191e6a2-1c4d-7a3b-9f10-2b3c4d5e6f70
        organizationId:
          type: string
          format: uuid
          example: 0191e6a2-0000-7000-8000-000000000001
        name:
          type: string
          example: Support Bot
        mode:
          type: string
          enum:
            - router
          example: router
        environment:
          type: string
          enum:
            - sandbox
            - production
          example: sandbox
        allowedTools:
          type: array
          items:
            type: string
          nullable: true
          example: null
        toolkitFilter:
          type: array
          items:
            type: string
          nullable: true
          example:
            - github
            - gmail
        settings:
          type: object
          additionalProperties: true
          example: {}
        statelessMode:
          type: boolean
          description: >-
            Whether this workspace runs in stateless chat mode. When `true`,
            `POST /mcp/{workspaceId}/chat` persists nothing and callers must
            supply prior turns via `history`.
          example: false
        status:
          type: string
          enum:
            - active
            - archived
          example: active
        llm:
          type: object
          description: >-
            Bring-your-own LLM (OpenRouter) status for the workspace.
            `openRouterApiKey` is never echoed here. When no key is configured,
            the platform falls back to its default model.
          properties:
            configured:
              type: boolean
              description: Whether a per-workspace OpenRouter key is set.
              example: true
            model:
              type: string
              nullable: true
              description: >-
                The configured OpenRouter model id (`vendor/model`), or `null`
                when none is set.
              example: anthropic/claude-sonnet-4-6
            verificationStatus:
              type: string
              enum:
                - verified
                - invalid
                - unverified
              nullable: true
              description: >-
                Result of validating the configured key: `verified` (key works),
                `invalid` (key rejected), `unverified` (not yet checked), or
                `null` when no key is configured.
              example: verified
            verifiedAt:
              type: string
              format: date-time
              nullable: true
              description: When the key was last successfully verified, if ever.
              example: '2026-05-29T10:05:00.000Z'
            updatedAt:
              type: string
              format: date-time
              nullable: true
              description: When the LLM key/model was last changed.
              example: '2026-05-29T10:05:00.000Z'
          required:
            - configured
            - model
            - verificationStatus
        createdAt:
          type: string
          format: date-time
          example: '2026-05-29T10:00:00.000Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-05-29T10:00:00.000Z'
      required:
        - id
        - organizationId
        - name
        - mode
        - environment
        - settings
        - statelessMode
        - status
        - createdAt
        - updatedAt
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Enter your API key with the Bearer prefix — e.g. Bearer sk_live_xxx
        (production) or Bearer sk_test_xxx (sandbox)

````