---
title: "Switch computer use on or off for the workspace"
method: PUT
path: "/v1/workspaces/{workspace_id}/computer-use"
tags: ["Workspaces"]
---

# Switch computer use on or off for the workspace

`PUT /v1/workspaces/{workspace_id}/computer-use`

## Request

- Base URL: `https://api.shardflux.dev`
- URL: `https://api.shardflux.dev/v1/workspaces/{workspace_id}/computer-use`
- Auth: HTTP bearer

enabled: true or false overrides the template’s switch; null follows it. While computer use is on, tool tokens carry the computer tool and the workspace desktop starts on the first computer call. Takes effect on the next tool token. 409 computer_use_unavailable when the workspace’s template version cannot run a desktop, 409 not_supported_for_mode for file-first workspaces, 409 workspace_deleted. Returns the switch.

## Path parameters

- `workspace_id` string, uuid, required

## Request body

- object
  - `enabled` boolean, nullable, required: true or false overrides the template; null follows it.

## Response `200`

Default Response

- ComputerUse
  - `enabled` boolean, required: Effective: tool tokens carry the computer tool (the workspace’s value, else the template’s, and the version runs a desktop).
  - `workspace` boolean, nullable, required: The workspace’s own value; null follows the template.
  - `template` boolean, required: The template’s switch for its workspaces.
  - `available` boolean, required: The workspace’s template version can run a desktop (its guest agent has desktop.v1).

## Other responses

- `4XX`: Default Response
- `5XX`: Default Response

---

[API](https://skmtc.dev/shardflux/apis/shardflux-api.md) · [All operations](https://skmtc.dev/shardflux/apis/shardflux-api/llms.txt) · [OpenAPI document](https://skmtc.dev/shardflux/apis/shardflux-api/revisions/ea685f7b39c4?raw)
