---
title: "Delete a workspace (two-step; ?confirm=true)"
method: DELETE
path: "/workspaces/{workspaceId}"
tags: ["Workspace"]
---

# Delete a workspace (two-step; ?confirm=true)

`DELETE /workspaces/{workspaceId}`

Permanently deletes a workspace and its entire entity tree (tables,
rows, cells, sequences, chat history, documents). Follows the v2
deletes convention — deliberately **two-step** so it can't fire on a
single ambiguous instruction:

1. Call **without** `?confirm=true` → **no deletion**. Returns HTTP
   200 with the impact preview
   `{ workspaceId, name, confirmationRequired: true, willDelete: { tables, rows } }`.
   The caller is expected to check with the user before proceeding.
2. After the user agrees, retry with `?confirm=true` → performs the
   cascade soft-delete and returns `{ workspaceId, name, deleted: true }`.

A missing / cross-org / already-deleted workspace returns
`404 WORKSPACE_NOT_FOUND`.

## Query parameters

- `confirm` boolean

## Response `200`

The impact preview (unconfirmed) or the delete receipt (confirmed).

- union
  - WorkspaceDeletePreview — Impact preview returned by `DELETE /workspaces/{workspaceId}` when `?confirm=true` is absent. Nothing has been removed.
    - `workspaceId` string, uuid, required
    - `name` string, required
    - `confirmationRequired` true, required
    - `willDelete` object, required
      - `tables` integer, required
      - `rows` integer, required
  - object
    - `workspaceId` string, uuid, required
    - `name` string, required
    - `deleted` true, required

## Other responses

- `404` — WORKSPACE_NOT_FOUND.

---

[API](https://skmtc.net/origami/apis/origami-agent-api.md) · [All operations](https://skmtc.net/origami/apis/origami-agent-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/origami/origami-agent-api/versions/8083ad7fe081/schema)
