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

# Update workspace settings

> Changes the workspace's settings by merge patch, keep_active and vm_size, and answers 200 with the workspace.

Use this tool when you need to:
- Keep a workspace from shutting down when idle, or let it shut down again
- Move a stopped workspace to another VM size before its next start

Examples:
- PATCH /workspaces/{workspaceID} {"keep_active": true}
- PATCH /workspaces/6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21 {"vm_size": "large"}

Hints:
- workspaceID is the workspace's uuid. The body is required (none is 400) and an absent field keeps its value, so an empty object answers the workspace unchanged.
- keep_active true suspends idle shutdown and false resumes it; vm_size sets the runtime class the workspace runs on, with its hardware: medium, large or xl (any other value, small included, is a plain 422).
- vm_size changes only while the workspace is not starting, preparing or ready and no lifecycle operation is in flight; otherwise the call is refused with 409 workspace_not_resizable and changes nothing, keep_active included.
- Use stopWorkspace first to resize a running workspace; use getWorkspace to read the settings.
- The workspace's creator, or an owner or admin of its organization; another member is refused with 403 control_forbidden, a viewer or billing member with 403 org_role_insufficient, a suspended organization with 403 org_suspended, a workspace in no organization the caller belongs to is 404, and 503 when the membership check is unavailable. An agent host's grant is refused with 403 agent_host_route_not_allowed.



## OpenAPI

````yaml api-reference/openapi.json PATCH /workspaces/{workspaceID}
openapi: 3.1.0
info:
  title: Aether API
  version: 0.1.0
servers:
  - url: https://api.runaether.dev
security:
  - bearerAuth: []
paths:
  /workspaces/{workspaceID}:
    patch:
      tags:
        - workspaces
      summary: Update workspace settings
      description: >-
        Changes the workspace's settings by merge patch, keep_active and
        vm_size, and answers 200 with the workspace.


        Use this tool when you need to:

        - Keep a workspace from shutting down when idle, or let it shut down
        again

        - Move a stopped workspace to another VM size before its next start


        Examples:

        - PATCH /workspaces/{workspaceID} {"keep_active": true}

        - PATCH /workspaces/6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21 {"vm_size":
        "large"}


        Hints:

        - workspaceID is the workspace's uuid. The body is required (none is
        400) and an absent field keeps its value, so an empty object answers the
        workspace unchanged.

        - keep_active true suspends idle shutdown and false resumes it; vm_size
        sets the runtime class the workspace runs on, with its hardware: medium,
        large or xl (any other value, small included, is a plain 422).

        - vm_size changes only while the workspace is not starting, preparing or
        ready and no lifecycle operation is in flight; otherwise the call is
        refused with 409 workspace_not_resizable and changes nothing,
        keep_active included.

        - Use stopWorkspace first to resize a running workspace; use
        getWorkspace to read the settings.

        - The workspace's creator, or an owner or admin of its organization;
        another member is refused with 403 control_forbidden, a viewer or
        billing member with 403 org_role_insufficient, a suspended organization
        with 403 org_suspended, a workspace in no organization the caller
        belongs to is 404, and 503 when the membership check is unavailable. An
        agent host's grant is refused with 403 agent_host_route_not_allowed.
      operationId: updateWorkspace
      parameters:
        - in: path
          name: workspaceID
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWorkspaceRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workspace'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacesErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacesErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/OrgAuthorizationErrorResponse'
                  - $ref: '#/components/schemas/ControlForbiddenErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacesErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacesErrorResponse'
          description: Conflict
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacesErrorResponse'
          description: Gone
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacesErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacesErrorResponse'
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacesErrorResponse'
          description: Service Unavailable
components:
  schemas:
    UpdateWorkspaceRequest:
      additionalProperties: false
      properties:
        keep_active:
          type: boolean
        vm_size:
          enum:
            - medium
            - large
            - xl
          type: string
      type: object
    Workspace:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          type: string
        display_state:
          enum:
            - deleted
            - idle
            - starting
            - stopping
            - suspending
            - ready
            - preparing
            - error
            - stopped
            - suspended
          type: string
        error_message:
          minLength: 1
          type: string
        git_ref:
          minLength: 1
          type: string
        hardware:
          $ref: '#/components/schemas/HardwareConfig'
        id:
          format: uuid
          type: string
        keep_active:
          type: boolean
        last_accessed_at:
          format: date-time
          type: string
        last_shutdown_at:
          format: date-time
          type: string
        last_started_at:
          format: date-time
          type: string
        machine_id:
          minLength: 1
          type: string
        previews:
          items:
            $ref: '#/components/schemas/DeclaredPreview'
          type: array
        private_ip:
          minLength: 1
          type: string
        project_id:
          format: uuid
          type: string
        startable:
          type: boolean
        task_id:
          format: uuid
          type: string
        updated_at:
          format: date-time
          type: string
        vm_size:
          enum:
            - small
            - medium
            - large
            - xl
          type: string
      required:
        - id
        - project_id
        - display_state
        - startable
        - previews
        - vm_size
        - hardware
        - keep_active
        - created_at
        - updated_at
      type: object
    WorkspacesErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - account_deleting
            - bad_gateway
            - bad_request
            - cli_upgrade_required
            - client_outdated
            - conflict
            - control_forbidden
            - forbidden
            - gateway_timeout
            - gone
            - internal_error
            - method_not_allowed
            - not_acceptable
            - not_found
            - not_implemented
            - org_role_insufficient
            - org_suspended
            - payment_required
            - precondition_failed
            - preview_auth_command_failed
            - preview_auth_invalid_output
            - preview_auth_not_auto
            - preview_auth_not_declared
            - preview_auth_output_too_large
            - preview_auth_rate_limited
            - preview_auth_timeout
            - preview_auth_workspace_upgrade_required
            - rate_limited
            - request_canceled
            - request_timeout
            - request_too_large
            - service_unavailable
            - task_creator_deleted
            - unauthenticated
            - unsupported_media_type
            - validation_failed
            - workspace_not_connectable
            - workspace_not_resizable
            - workspace_not_running
            - workspace_preview_auth_service_not_ready
            - workspace_startable
            - workspace_transitional
          minLength: 1
          type: string
        error:
          minLength: 1
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
      required:
        - error
        - code
      type: object
    OrgAuthorizationErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - org_membership_required
            - org_role_insufficient
            - org_suspended
            - account_deleting
            - agent_host_route_not_allowed
            - credential_kind_not_admitted
            - grant_scope_insufficient
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    ControlForbiddenErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - control_forbidden
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    HardwareConfig:
      additionalProperties: false
      properties:
        cpu_kind:
          enum:
            - shared
            - performance
          type: string
        cpus:
          format: int64
          maximum: 16
          minimum: 1
          type: integer
        gpu_kind:
          enum:
            - a10
            - l40s
            - a100-40gb
            - a100-80gb
          type:
            - string
            - 'null'
        memory_mb:
          format: int64
          maximum: 32768
          minimum: 256
          type: integer
        volume_size_gb:
          format: int64
          maximum: 500
          minimum: 1
          type: integer
      required:
        - cpu_kind
        - cpus
        - memory_mb
        - volume_size_gb
        - gpu_kind
      type: object
    DeclaredPreview:
      additionalProperties: false
      properties:
        name:
          maxLength: 200
          minLength: 1
          pattern: \S
          type: string
        port:
          maximum: 65535
          minimum: 1
          type: integer
        url:
          format: uri
          type: string
      required:
        - name
        - port
        - url
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

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