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

# Move a file or directory



## OpenAPI

````yaml /api-reference/openapi.personal.json post /v1/orgs/{slug}/volumes/{id}/files/rename
openapi: 3.1.0
info:
  title: Personal token API
  description: User-scoped API for account and organization management.
  version: 0.1.0
servers:
  - url: https://api.microsandbox.dev
security:
  - bearer: []
paths:
  /v1/orgs/{slug}/volumes/{id}/files/rename:
    post:
      tags:
        - Volumes
      summary: Move a file or directory
      operationId: rename
      parameters:
        - name: slug
          in: path
          description: Organization slug
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Volume UUID
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileMoveRequest'
        required: true
      responses:
        '200':
          description: Move a file or directory
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeFileMutationResponse'
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
        '403':
          description: Insufficient permissions
        '404':
          description: Volume or path not found
        '502':
          description: Volume filesystem unavailable
      security:
        - bearer: []
components:
  schemas:
    FileMoveRequest:
      type: object
      required:
        - from
        - to
      properties:
        from:
          type: string
        to:
          type: string
    VolumeFileMutationResponse:
      type: object
      description: Confirmation that a filesystem change succeeded.
      required:
        - ok
      properties:
        ok:
          type: boolean
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        Personal access token (msb_pat_…) or session JWT - the credential an
        agent acts with on a user's behalf.

````