Skip to main content
Delete Workspace
Deletes a workspace. Owner-only (the workspace’s own owner, or an ancestor owner via the god path). There is no delete-workspace capability. Deletion cascades the entire subtree in one transaction, bottom-up: invitations → members → workspaces. Every workspace actually deleted fires a workspace.deleted webhook (one per workspace).
No per-member webhooks fire on this path. The cascade does not emit workspace.member.removed for the memberships it tears down — one POST per member across a large subtree would flood a delivery layer with no retry or batching, and workspace.deleted already says the whole roster is gone. Treat each workspace.deleted as removing that node’s entire roster. See Webhooks & lifecycle.
Your own data tagged with a workspace id (docs, issues, etc.) is not deleted by Sublay — Sublay doesn’t know about it. React to the workspace.deleted webhook to clean up your own workspace-tagged data.

Path Parameters

string
required
The workspace UUID.

Query Parameters

string
required
Service keys only — the user to act as. Required with a service key: a key that names nobody is refused with 400 workspace/missing-user-id. Enforced: the owner-only guard runs against the named user, so a key naming a non-owner is refused exactly as that user would be. A user token always acts as its own user and must not send it (400 workspace/acting-user-not-allowed). See Acting on behalf of a user.Several shapes are refused rather than ignored on this path. actingUserId: "" or null is a 400 — it reads as an attempt to name someone, not as “nobody”. So is every query parameter this endpoint does not declare, for every caller: onBehalfOf, acting_user_id and impersonate all come back as Unrecognized key: "…" rather than being quietly dropped. A key that differs from actingUserId only in capitalization — actingUserID, actinguserid — is refused too, but with a “did you mean actingUserId?” message instead of the generic one. The request takes no body: any body is 400 workspace/body-not-allowed. See Shapes the server rejects.

Response

204 No Content on success, with no body.

Error Responses

The acting user can see the workspace but is neither its owner nor an owner of a workspace above it.
The workspace doesn’t exist, or the acting user has no relation to it (not its owner, an ancestor owner, a member or a reach-holder): the two answer alike, with the same body Fetch Workspace gives. Also returned when the workspace is deleted while this request is being handled.
Every path id on the workspaces bundle is checked for UUID shape before the route runs, so a malformed one is a plain 400 rather than a 500 from the database.
Every workspaces endpoint declares its fields exactly, and a query parameter this DELETE does not declare is refused rather than ignored, for every caller. Two or more at once are named together: Unrecognized keys: "onBehalfOf", "impersonate". Send only actingUserId. See Shapes the server rejects.
A DELETE takes every field, actingUserId included, in the query string, so any request body is refused: a JSON object with keys, a non-empty array, or a non-JSON payload such as multipart (then params is omitted). An absent body and {} pass.
A service key sent no actingUserId. The request has to act as somebody, and is held to exactly that user’s standing on the workspace.
A user token sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
Returned when a service key names an actingUserId that isn’t a user in this project.