Skip to main content
Leave Workspace
Removes the caller’s own membership on this node only (self-service, no capability). Leaving a parent while still owning a child is fine — ownership is independent of membership. Fires workspace.member.removed.
An owner has no member row and cannot leave via this path — an owner exits by transferring ownership or deleting the workspace. Sole-owner protection blocks a sole owner from leaving without transferring first. If the caller has no direct member row here (only reaches in from an ancestor), leave is a no-op / 404.

Path Parameters

string
required
The workspace UUID.

Body Parameters

string
required
Service/master keys only — the user to act as, whose membership is removed (sent in the body so the act-as-user path works on DELETE). Required for a key: leaving is inherently self-service, so there is no unbounded path — a key that names nobody is refused with 400 workspace/missing-user-id.A plain user token omits it — the actor is the token’s own user. The field is not ignored for such a token: sending your own user id is a harmless no-op, but sending anyone else’s is a 403 workspace/unauthorized. See Acting on behalf of a user.

Response

204 No Content on success.

Error Responses

A service/master key called this route without naming an actingUserId. Leaving removes your own membership row; there is none for the app itself. To remove somebody else, use Remove Member.
A plain user token sent an actingUserId naming a different user. Only a service/master key may act as someone else.
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.