Leave Workspace
POST
/web/v1/users/self/workspaces/{workspaceBizId}/leave JWTRemoves the authenticated user from the specified workspace.
Required Headers
| Header | Example Value | Description |
|---|---|---|
| Content-Type | application/json | Request content type |
| Accept | application/json | Expected response type |
| X-Client-Hash | Client device fingerprint | |
| Accept-Language | en, zh, zh-Hant, ja, vi | Response language (default: en) |
| Authorization | Bearer | JWT access token |
| X-Workspace-Id | Target workspace ID |
Request Parameters
| Name | Type | Required | In | Description |
|---|---|---|---|---|
workspaceBizId | String | Required | path | Business ID of the workspace |
Success Response
Success 200
{
"version": "1.3.0",
"timestamp": 1709337600000,
"success": true,
"code": "2000",
"message": "SUCCESS",
"data": null
}Error Responses
Unauthorized 401
{
"success": false,
"code": "4010",
"message": "Invalid or expired token"
}Notes
- This endpoint operates on the authenticated user's own resources.
- Returns no data payload on success (
data: null). - Requires workspace membership.
- Workspace owner cannot leave — must transfer ownership first via
POST /workspaces/admin/{id}/ownership/{newOwnerId}. - Owner leave attempt returns error:
{"code": "CANNOT_REMOVE_OWNER", "message": "Workspace owner cannot leave. Transfer ownership first."}