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

# Update workspace

> Change the name or scope of an existing workspace.



## OpenAPI

````yaml api-reference/accounts/openapi.json PUT /v1/workspaces/{workspaceId}
openapi: 3.0.3
info:
  title: Persistence Accounts and Workspaces API
  version: '1.0'
  description: Manage Persistence workspaces and their API keys.
servers:
  - url: https://api.persistence.dev
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Accounts and workspaces
    description: Workspace management and API key creation.
paths:
  /v1/workspaces/{workspaceId}:
    put:
      tags:
        - Accounts and workspaces
      summary: Update workspace
      description: Update the name or scope of an existing workspace.
      operationId: updateWorkspace
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: string
          description: Workspace ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceRequest'
        description: Update workspace request
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    WorkspaceRequest:
      type: object
      properties:
        name:
          type: string
        scope:
          type: string
    WorkspaceResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Workspace'
        success:
          type: boolean
    Error:
      type: object
      properties:
        code:
          type: string
        error:
          type: string
    Workspace:
      type: object
      properties:
        id:
          type: string
        meta:
          type: object
          additionalProperties: {}
        name:
          type: string
        path:
          type: string
        scope:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key issued for your workspace.

````