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

# Start workspace

> Start the workspace using its saved configuration and retained state. The server checks policies and reloads credentials. If already running, return the existing workspace.

RAM-backed files do not survive a stop/start cycle.

> [accordion] Errors
>
> | Status | Meaning |
> | - | - |
> | `400` | Bad request: malformed, a host not allowed, or a browser page from another origin |
> | `401` | The token is missing or wrong |
> | `403` | A policy or mount mode refused the call |
> | `404` | The workspace, session, job or file does not exist |
> | `409` | The id or name is taken, the workspace is busy, or a file changed since it was read |
> | `422` | Validation Error |
> | `429` | Past a rate limit, or a new session past max\_sessions |
> | `503` | The server is at max\_workspaces, or shutting down |
>
> See [error examples and recovery steps](https://docs.mirage.strukto.ai/api/errors.md). The [complete OpenAPI contract](https://github.com/strukto-ai/mirage/blob/main/docs/openapi.yaml) includes every response schema.


## OpenAPI

````yaml /openapi.yaml post /v1/workspaces/{workspace_id}/start
openapi: 3.2.0
info:
  title: Mirage API
  version: '0.1'
servers:
  - url: http://127.0.0.1:8765
    description: A local server on its default port
security:
  - bearerAuth: []
tags:
  - name: Workspace operations
    x-group: Workspaces
  - name: Workspaces
    x-group: Lifecycle
    parent: Workspace operations
  - name: Sessions
  - name: Shell
    parent: Workspace operations
  - name: VFS
    parent: Workspace operations
  - name: Tools
  - name: Documents
    x-group: Agent Instructions
    parent: Workspace operations
  - name: Snapshots
  - name: Templates
    parent: Configuration
  - name: Saved VFS
    x-group: VFS
    parent: Configuration
  - name: Saved CLIs
    x-group: CLI
    parent: Configuration
  - name: Saved runtimes
    x-group: Runtime
    parent: Configuration
  - name: Saved machines
    x-group: Machine
    parent: Configuration
  - name: Configuration
  - name: Policies
    parent: Configuration
  - name: Asks
    parent: Workspace operations
    x-group: Approval requests
  - name: Lines
    parent: Workspace operations
    x-group: Commands
  - name: Jobs
    parent: Workspace operations
  - name: Processes
    parent: Workspace operations
  - name: Machines
    parent: Workspace operations
  - name: Server
  - name: Service
    parent: Server
  - name: Daemon
    parent: Server
  - name: Auth
paths:
  /v1/workspaces/{workspace_id}/start:
    post:
      tags:
        - Workspaces
      summary: Start workspace
      description: >-
        Start the workspace using its saved configuration and retained state.
        The server checks policies and reloads credentials. If already running,
        return the existing workspace.


        RAM-backed files do not survive a stop/start cycle.
      operationId: start_workspace_v1_workspaces__workspace_id__start_post
      parameters:
        - $ref: '#/components/parameters/workspaceId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceDetail'
components:
  parameters:
    workspaceId:
      name: workspace_id
      in: path
      required: true
      description: Workspace ID.
      schema:
        type: string
      example: demo
  schemas:
    WorkspaceDetail:
      properties:
        id:
          title: Id
          type: string
        status:
          type: string
          enum:
            - running
            - stopped
          title: Status
          description: >-
            running while the server holds the workspace in memory; stopped
            while it keeps only its config and state, until a start.
        created_at:
          type: number
          title: Created At
          description: >-
            Creation time as Unix seconds. For example, 1794009600 is
            2026-11-07T00:00:00Z. Fractional values include sub-second
            precision.
          example: 1794009600
        system_time:
          anyOf:
            - type: string
            - type: 'null'
          title: System Time
        sessions:
          items:
            $ref: '#/components/schemas/SessionSummary'
          type: array
          title: Sessions
        mounts:
          items:
            $ref: '#/components/schemas/MountSummary'
          type: array
          title: Mounts
        internals:
          anyOf:
            - $ref: '#/components/schemas/WorkspaceInternals'
            - type: 'null'
      type: object
      required:
        - id
        - status
        - created_at
      title: WorkspaceDetail
    SessionSummary:
      properties:
        session_id:
          type: string
          title: Session Id
        cwd:
          type: string
          title: Cwd
      type: object
      required:
        - session_id
        - cwd
      title: SessionSummary
    MountSummary:
      properties:
        prefix:
          type: string
          title: Prefix
        vfs:
          type: string
          title: Vfs
        mode:
          type: string
          title: Mode
        description:
          type: string
          title: Description
          default: ''
        backend:
          $ref: '#/components/schemas/MountBackend'
          default: workspace
        mountpoint:
          anyOf:
            - type: string
            - type: 'null'
          title: Mountpoint
          description: >-
            Where the server exposes this mount on its own host, the generated
            path when the config named none; null for a workspace mount, and
            while the workspace is stopped.
      type: object
      required:
        - prefix
        - vfs
        - mode
      title: MountSummary
    WorkspaceInternals:
      properties:
        cache_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cache Bytes
        cache_entries:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cache Entries
        history_length:
          type: integer
          title: History Length
        in_flight_jobs:
          type: integer
          title: In Flight Jobs
      type: object
      required:
        - cache_bytes
        - cache_entries
        - history_length
        - in_flight_jobs
      title: WorkspaceInternals
    MountBackend:
      type: string
      enum:
        - workspace
        - fuse
        - fskit
        - nfs
      title: MountBackend
      description: >-
        How the mount is exposed. `workspace` is available only through Mirage.
        `fuse` and `fskit` expose operating-system mountpoints. `nfs` uses the
        system NFS client on Linux or macOS; Linux requires root.


        FSKit requires macOS 15.4 or later. FSKit and NFS require known file
        sizes for correct reads. NFS is read-only. The macFUSE FSKit adapter
        supports appends and metadata changes, but new-file and
        truncate-then-write operations can write zero-filled data instead of
        content. Select the backend explicitly.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        The server's token (MIRAGE_AUTH_TOKEN) or a JWT. A daemon in the default
        local mode with no token accepts requests without one.

````

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