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

# Create a persistent volume

> Create a persistent volume mounted into this workspace at a path.

See [persistent volumes](/guides/persistent-volumes) for mounting, capacity, and recovery guidance. Workspace root filesystem snapshots do not include volume contents.


## OpenAPI

````yaml openapi/deployment-storage-api.json POST /api/v1/workspaces/{id}/volumes
openapi: 3.1.0
info:
  title: Rigbox Deployment and Storage API
  description: >-
    Gateway-owned public API for Rigbox. The gateway composes its local
    lifecycle API with service-owned exported specs.
  contact:
    name: Rigbox
    url: https://rigbox.dev
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.rigbox.dev
    description: Production gateway
security: []
paths:
  /api/v1/workspaces/{id}/volumes:
    post:
      tags:
        - Volumes
      summary: Create a persistent volume on a workspace.
      description: Create a persistent volume mounted into this workspace at a path.
      operationId: create_workspace_volume
      parameters:
        - name: id
          in: path
          description: Workspace ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVolumeRequest'
        required: true
      responses:
        '201':
          description: Volume created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeResponse'
      security:
        - bearer: []
components:
  schemas:
    CreateVolumeRequest:
      type: object
      required:
        - name
        - size_mb
        - mount_path
      properties:
        mount_path:
          type: string
        name:
          type: string
        size_mb:
          type: integer
          format: int32
          minimum: 0
    VolumeResponse:
      type: object
      required:
        - volume
      properties:
        volume:
          $ref: '#/components/schemas/Volume'
    Volume:
      type: object
      description: >-
        A persistent volume attached to a workspace VM.


        Backed by a host ext4 file (`host_path`) mounted in-guest at
        `mount_path`

        via a second Firecracker drive. Separate from the rootfs image, so its
        data

        survives a rootfs/image swap. Serialized over the wire for `rig volume`.
      required:
        - id
        - workspace_id
        - node_id
        - name
        - size_mb
        - mount_path
        - host_path
        - created_at
      properties:
        created_at:
          type: string
          format: date-time
        host_path:
          type: string
        id:
          type: string
        migrated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Set once the one-time rootfs->volume data copy has run (advisory;
            the

            in-guest sentinel on the volume is authoritative).
        mount_path:
          type: string
        name:
          type: string
        node_id:
          type: string
        size_mb:
          type: integer
          format: int32
          minimum: 0
        workspace_id:
          type: string
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````