> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-toolre-1772123259-dfebfdb.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a Volume

> Update a volume's display name and/or storage size.

You can update:
- **name**: New display name (must be unique within the organization)
- **size**: New storage size (only increases allowed, cannot decrease)

The storage increase is subject to quota limits configured via
Metronome org config.



## OpenAPI

````yaml https://api.host.langchain.com/openapi.json patch /v2/sandboxes/volumes/{name}
openapi: 3.1.0
info:
  title: LangSmith Deployment Control Plane API
  description: >
    The LangSmith Deployment Control Plane API is used to programmatically
    create and manage

    Agent Server deployments. For example, the APIs can be orchestrated to

    create custom CI/CD workflows.


    ## Host

    https://api.host.langchain.com


    ## Authentication

    To authenticate with the LangSmith Deployment Control Plane API, set the
    `X-Api-Key` header

    to a valid [LangSmith API
    key](https://docs.langchain.com/langsmith/create-account-api-key#create-an-api-key).


    ## Versioning

    Each endpoint path is prefixed with a version (e.g. `v1`, `v2`).


    ## Quick Start

    1. Call `POST /v2/deployments` to create a new Deployment. The response body
    contains the Deployment ID (`id`) and the ID of the latest (and first)
    revision (`latest_revision_id`).

    1. Call `GET /v2/deployments/{deployment_id}` to retrieve the Deployment.
    Set `deployment_id` in the URL to the value of Deployment ID (`id`).

    1. Poll for revision `status` until `status` is `DEPLOYED` by calling `GET
    /v2/deployments/{deployment_id}/revisions/{latest_revision_id}`.

    1. Call `PATCH /v2/deployments/{deployment_id}` to update the deployment.
  version: 0.1.0
servers: []
security: []
paths:
  /v2/sandboxes/volumes/{name}:
    patch:
      tags:
        - Sandboxes (v2)
      summary: Update a Volume
      description: |-
        Update a volume's display name and/or storage size.

        You can update:
        - **name**: New display name (must be unique within the organization)
        - **size**: New storage size (only increases allowed, cannot decrease)

        The storage increase is subject to quota limits configured via
        Metronome org config.
      operationId: update_volume_v2_sandboxes_volumes__name__patch
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
            description: Volume name
            title: Name
          description: Volume name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VolumeUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeResponse'
        '400':
          description: Bad Request - Size decrease not allowed
          content:
            application/json:
              example:
                detail:
                  error: ResizeError
                  message: >-
                    Storage cannot be decreased. Current: 5.00Gi, Requested:
                    2.00Gi
        '404':
          description: Not Found
          content:
            application/json:
              example:
                detail:
                  error: NotFound
                  message: Resource not found.
        '409':
          description: Conflict - Name already in use
          content:
            application/json:
              example:
                detail:
                  error: Conflict
                  message: Volume 'new-name' already exists
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too Many Requests - Quota exceeded
          content:
            application/json:
              example:
                detail: >-
                  Sandbox storage quota exceeded. Limit: 10Gi, Current usage:
                  8.00Gi, Requested increase: 5.00Gi.
      security:
        - API Key: []
        - Tenant ID: []
        - Bearer Auth: []
components:
  schemas:
    VolumeUpdate:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: >-
            New display name for the volume (max 63 chars, DNS-1035 format).
            Must be unique within the organization.
        size:
          anyOf:
            - type: string
            - type: 'null'
          title: Size
          description: >-
            New storage size. Must be greater than or equal to current size.
            Storage cannot be decreased.
          examples:
            - 10Gi
            - 20Gi
      type: object
      title: VolumeUpdate
      description: >-
        Request model for updating a Volume.


        You can update the display name and/or the storage size.

        Storage can only be increased (cannot be decreased due to K8s PVC
        limitations).
    VolumeResponse:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: Unique volume identifier
        name:
          type: string
          title: Name
        size:
          type: string
          title: Size
        storage_class:
          type: string
          title: Storage Class
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
      type: object
      required:
        - name
        - size
        - storage_class
      title: VolumeResponse
      description: Response model for a Volume.
    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

````