Browser Use Workspaces API

The Workspaces API from Browser Use — 5 operation(s) for workspaces.

GitHub OpenAPI

Operations 8

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /workspaces Create a workspace for shared file storage · Create Workspace #
Ask an LLM
“How do I keep files available to the agent across multiple sessions?”
“Can I set up persistent storage that several sessions share?”
Tell an agent
Create a workspace called {name}.
Set up a new persistent workspace named {name} for my agent's files.
POST /workspaces/{workspace_id}/files/upload Get upload URLs for files in a workspace · Upload Workspace Files #
Ask an LLM
“How do I upload several files into a workspace at once?”
“Can I upload files into a specific folder of a workspace?”
Tell an agent
Get upload URLs to add {files} to workspace {workspace_id}.
Prepare uploads for {files} into folder {prefix} of workspace {workspace_id}.
GET /workspaces/{workspace_id} Get a workspace's details · Get Workspace #
Ask an LLM
“What are the details of a specific workspace?”
“Can I look up one workspace by its ID?”
Tell an agent
Show the details of workspace {workspace_id}.
Get workspace {workspace_id}.
PATCH /workspaces/{workspace_id} Rename a workspace · Update Workspace #
Ask an LLM
“Can I rename a workspace after creating it?”
“How do I change the name of an existing workspace?”
Tell an agent
Rename workspace {workspace_id} to {name}.
Change the name of workspace {workspace_id} to {name}.
DELETE /workspaces/{workspace_id} Delete a workspace and all its files · Delete Workspace #
Ask an LLM
“How do I delete a whole workspace including everything stored in it?”
“Does removing a workspace also erase its stored data?”
Tell an agent destructive · confirm first
Delete workspace {workspace_id} and all of its stored data.
Tear down the workspace {workspace_id} completely.
GET /workspaces/{workspace_id}/size Check a workspace's storage usage · Get Workspace Size #
Ask an LLM
“How much storage is a workspace using right now?”
“Is my workspace getting large?”
Tell an agent
Show the current storage usage of workspace {workspace_id}.
Tell me how big workspace {workspace_id} is.
GET /workspaces/{workspace_id}/files List files in a workspace · List Workspace Files #
Ask an LLM
“What files are stored in my workspace?”
“Can I list only the files under one folder of a workspace, without recursing into subfolders?”
Tell an agent
List the files in workspace {workspace_id} under {prefix}.
Show files in workspace {workspace_id} with download URLs included: {urls}.
DELETE /workspaces/{workspace_id}/files Delete one file from a workspace · Delete Workspace File #
Ask an LLM
“How do I delete a single file from a workspace without removing the workspace?”
“Can I remove one stored file by its path?”
Tell an agent destructive · confirm first
Delete the file at {path} from workspace {workspace_id}.
Remove {path} from workspace {workspace_id}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/browser-use:browser-use-workspaces-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

browser-use-workspaces-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Browser Use Public API v4 Workspaces API
  summary: Browser Use agent runs API (v4)
  version: 4.0.0
servers:
- url: https://api.browser-use.com/api/v4
  description: Production server
tags:
- name: Workspaces
paths:
  /workspaces:
    post:
      tags:
      - Workspaces
      summary: Create Workspace
      description: 'Mint an empty workspace. Lets callers upload input files BEFORE the

        first run exists; pass the id as workspaceId on POST /runs.'
      operationId: create_workspace_workspaces_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceCreateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceInfo'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - APIKeyHeader: []
  /workspaces/{workspace_id}/files/upload:
    post:
      tags:
      - Workspaces
      summary: Upload Workspace Files
      description: 'Presigned PUT URLs for input files, placed under ``uploads/`` in the

        workspace. The agent pulls them in at the start of every run. URLs are

        pinned to the declared Content-Type and exact Content-Length.'
      operationId: upload_workspace_files_workspaces__workspace_id__files_upload_post
      security:
      - APIKeyHeader: []
      parameters:
      - name: workspace_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Workspace Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceFileUploadRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceFileUploadResponse'
        '403':
          description: Zero Data Retention is enabled on the project (V4 unsupported).
        '404':
          description: Run, session, workspace, or profile not found.
        '400':
          description: Invalid request (bad session/workspace pairing or file path).
        '409':
          description: One or more files would replace existing workspace files.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /workspaces/{workspace_id}:
    get:
      tags:
      - Workspaces
      summary: Get Workspace
      operationId: get_workspace_workspaces__workspace_id__get
      security:
      - APIKeyHeader: []
      parameters:
      - name: workspace_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Workspace Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceInfo'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Workspaces
      summary: Update Workspace
      description: Rename a workspace. Explicit null clears the name; omission is a no-op.
      operationId: update_workspace_workspaces__workspace_id__patch
      security:
      - APIKeyHeader: []
      parameters:
      - name: workspace_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Workspace Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceInfo'
        '404':
          description: Run, session, workspace, or profile not found.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Workspaces
      summary: Delete Workspace
      description: Archive a workspace. Idempotent for missing, archived, and foreign ids.
      operationId: delete_workspace_workspaces__workspace_id__delete
      security:
      - APIKeyHeader: []
      parameters:
      - name: workspace_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Workspace Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /workspaces/{workspace_id}/size:
    get:
      tags:
      - Workspaces
      summary: Get Workspace Size
      description: Return current storage usage and the plan-specific workspace quota.
      operationId: get_workspace_size_workspaces__workspace_id__size_get
      security:
      - APIKeyHeader: []
      parameters:
      - name: workspace_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Workspace Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceSizeInfo'
        '404':
          description: Run, session, workspace, or profile not found.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /workspaces/{workspace_id}/files:
    get:
      tags:
      - Workspaces
      summary: List Workspace Files
      description: List files the agent has produced for this workspace, paginated.
      operationId: list_workspace_files_workspaces__workspace_id__files_get
      security:
      - APIKeyHeader: []
      parameters:
      - name: workspace_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Workspace Id
      - name: prefix
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Prefix
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          default: 50
          title: Limit
      - name: cursor
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Cursor
      - name: includeUrls
        in: query
        required: false
        schema:
          type: boolean
          default: false
          title: Includeurls
      - name: contentDisposition
        in: query
        required: false
        schema:
          anyOf:
          - const: attachment
            type: string
          - type: 'null'
          title: Contentdisposition
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceFileListResponse'
        '403':
          description: Zero Data Retention is enabled on the project (V4 unsupported).
        '404':
          description: Run, session, workspace, or profile not found.
        '400':
          description: Malformed pagination cursor.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Workspaces
      summary: Delete Workspace File
      description: Delete one exact path from a workspace and remove matching upload metadata.
      operationId: delete_workspace_file_workspaces__workspace_id__files_delete
      security:
      - APIKeyHeader: []
      parameters:
      - name: workspace_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Workspace Id
      - name: path
        in: query
        required: true
        schema:
          type: string
          minLength: 1
          description: Relative file path to delete
          title: Path
        description: Relative file path to delete
      responses:
        '204':
          description: Successful Response
        '404':
          description: Run, session, workspace, or profile not found.
        '400':
          description: Invalid request (bad session/workspace pairing or file path).
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    WorkspaceFileUploadItem:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
          description: Filename, e.g. "data.csv"
        contentType:
          type: string
          maxLength: 255
          title: Contenttype
          description: MIME type, e.g. "text/csv"
          default: application/octet-stream
        size:
          type: integer
          maximum: 52428800.0
          minimum: 1.0
          title: Size
          description: Exact file size in bytes; the presigned URL is pinned to it.
      type: object
      required:
      - name
      - size
      title: WorkspaceFileUploadItem
    WorkspaceFileListResponse:
      properties:
        files:
          items:
            $ref: '#/components/schemas/WorkspaceFileInfo'
          type: array
          title: Files
        nextCursor:
          anyOf:
          - type: string
          - type: 'null'
          title: Nextcursor
        hasMore:
          type: boolean
          title: Hasmore
          default: false
      type: object
      required:
      - files
      title: WorkspaceFileListResponse
    WorkspaceFileUploadResponseItem:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Upload id. Pass THIS in RunCreateRequest.attachedFileIds to attach the file to a run.
        name:
          type: string
          title: Name
          description: Original filename from the request
        storedName:
          type: string
          title: Storedname
          description: Sanitized filename the object is stored under, e.g. "data.csv".
        path:
          type: string
          title: Path
          description: Path within the workspace, e.g. "uploads/data.csv"
        willOverride:
          type: boolean
          title: Willoverride
          description: True if a file with this stored_name already exists in the workspace and uploading will replace it. Surface a warning to the user.
        uploadUrl:
          type: string
          title: Uploadurl
          description: Presigned PUT URL (5 min expiry). PUT the file bytes with the matching Content-Type and Content-Length headers.
      type: object
      required:
      - id
      - name
      - storedName
      - path
      - willOverride
      - uploadUrl
      title: WorkspaceFileUploadResponseItem
    WorkspaceInfo:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        archived:
          type: boolean
          title: Archived
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      required:
      - id
      - archived
      - createdAt
      - updatedAt
      title: WorkspaceInfo
    WorkspaceFileUploadResponse:
      properties:
        files:
          items:
            $ref: '#/components/schemas/WorkspaceFileUploadResponseItem'
          type: array
          title: Files
      type: object
      required:
      - files
      title: WorkspaceFileUploadResponse
    WorkspaceUpdateRequest:
      properties:
        name:
          anyOf:
          - type: string
            maxLength: 100
          - type: 'null'
          title: Name
      type: object
      title: WorkspaceUpdateRequest
    WorkspaceFileInfo:
      properties:
        path:
          type: string
          title: Path
          description: File path relative to the workspace root
        size:
          type: integer
          title: Size
          description: File size in bytes
        lastModified:
          type: string
          format: date-time
          title: Lastmodified
          description: When the file was last modified
        url:
          anyOf:
          - type: string
          - type: 'null'
          title: Url
          description: Presigned download URL (60s expiry). Only included when `includeUrls=true`.
      type: object
      required:
      - path
      - size
      - lastModified
      title: WorkspaceFileInfo
      description: 'A file the agent has produced for the workspace. Shape mirrors V3

        files (FileInfo) so a single UI component can render both.'
    WorkspaceSizeInfo:
      properties:
        usedBytes:
          type: integer
          minimum: 0.0
          title: Usedbytes
          description: Current workspace storage usage in bytes.
        maxBytes:
          type: integer
          exclusiveMinimum: 0.0
          title: Maxbytes
          description: Maximum workspace storage allowed in bytes.
      type: object
      required:
      - usedBytes
      - maxBytes
      title: WorkspaceSizeInfo
    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
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WorkspaceCreateRequest:
      properties:
        name:
          anyOf:
          - type: string
            maxLength: 100
          - type: 'null'
          title: Name
      type: object
      title: WorkspaceCreateRequest
    WorkspaceFileUploadRequest:
      properties:
        files:
          items:
            $ref: '#/components/schemas/WorkspaceFileUploadItem'
          type: array
          maxItems: 10
          minItems: 1
          title: Files
        allowOverrides:
          type: boolean
          title: Allowoverrides
          description: When false, return 409 before reserving storage if any uploaded filename would replace an existing workspace file.
          default: true
      type: object
      required:
      - files
      title: WorkspaceFileUploadRequest
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Browser-Use-API-Key