---
title: "Replace a workbench's content"
method: PUT
path: "/v1/workbenches/{id}/content"
tags: ["Workbenches"]
---

# Replace a workbench's content

`PUT /v1/workbenches/{id}/content`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/workbenches/{id}/content`
- Auth: HTTP bearer

Replaces the workbench's content (its durable data) with an object its kind checks.
The view is untouched. A kind this build does not register answers `unknown_kind`.
Mirrors `workbench_update_content`.

## Path parameters

- `id` string, required

## Request body

- WireWorkbenchContentUpdateRequest
  - `content` object, required
  - `expectedRevision` integer

## Response `200`

The updated workbench

- WireWorkbench: One workbench: the container for one feature's content and working state, owned by a project and addressed by its Asset id. `kind` is an open, namespaced id; a kind a client does not know is shown as an unsupported workbench kind. Unknown fields are tolerated and must be carried.
  - `id` string, required: The workbench's Asset id.
  - `kind` string, required: Namespaced kind id, such as `piper.image`.
  - `projectId` string, required
  - `name` string, required
  - `revision` integer, required: Write counter, 1 at creation, advanced by every change; compared with `expectedRevision`.
  - `createdAt` string, required
  - `updatedAt` string, required
  - `content` object, required: The kind's durable data.
  - `view` object, required: The kind's last-used working state.

## Other responses

- `400`: A malformed body, or `unknown_kind` / `invalid_content`
- `404`: No workbench with that id
- `409`: `revision_conflict`: the workbench is no longer at `expectedRevision`. Nothing changed; read it again and retry.

---

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