> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squarecloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Leave Workspace

> Leave a workspace.

<ParamField header="Authorization" type="string" placeholder="API Key" required>
  The API key for your account. You can find this in your [account settings](https://squarecloud.app/en/account/security).
</ParamField>

Removes the authenticated user from a workspace's member list. This is the self-service counterpart to [Remove Member](/en/api-reference/endpoint/workspace/members/kick), for a member who wants out without asking the owner to act.

The workspace owner cannot leave their own workspace this way; they must call [Delete Workspace](/en/api-reference/endpoint/workspace/delete) instead, which removes it for every member. Leaving revokes access to the workspace's shared applications immediately. Rate limited to 1 request every 5 seconds per user.

### Parameters

<ParamField body="workspaceId" type="string" placeholder="Workspace Id">
  The ID of the workspace.
</ParamField>

### Response

<ResponseField name="status" type="string">
  Indicates whether the call was successful.. `success` if successful, `error` if not.
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
    "status": "success"
  }
  ```
</ResponseExample>

### Common errors

| Code                  | HTTP | Meaning                                                                  |
| --------------------- | ---- | ------------------------------------------------------------------------ |
| `INVALID_ID`          | 400  | `workspaceId` is missing.                                                |
| `CANNOT_LEAVE_OWNER`  | 400  | The caller is the workspace owner and must delete it instead of leaving. |
| `WORKSPACE_NOT_FOUND` | 404  | The workspace does not exist or the caller is not a member.              |
