Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ export default withMermaid(
{ text: "Overview", link: "/api-reference/members/overview" },
{ text: "Get Workspace Members", link: "/api-reference/members/get-workspace-members" },
{ text: "Get Project Members", link: "/api-reference/members/get-project-members" },
{ text: "Remove Workspace Members", link: "/api-reference/members/remove-workspace-member" },
],
},
{
Expand Down
157 changes: 157 additions & 0 deletions docs/api-reference/members/remove-workspace-member.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
---
title: Remove workspace member
description: Remove a member from a workspace via Plane API. HTTP POST request to deactivate users across projects and teamspaces.
keywords: plane api, remove member, delete member, workspace members, user management, rest api, api integration
---

# Remove workspace member

<div class="api-endpoint-badge">
<span class="method post">POST</span>
<span class="path">/api/v1/workspaces/{slug}/members/remove/</span>
</div>

<div class="api-two-column">
<div class="api-left">

Removes a member from a workspace. This deactivates them across all projects, removes them from teamspaces and pages, and optionally reduces seat count.

<div class="params-section">

### Path parameters

<div class="params-list">

<ApiParam name="slug" type="string" :required="true">

The unique identifier (slug) for the workspace.

</ApiParam>

</div>
Comment on lines +19 to +31
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Heading level skips from h1 to h3.

Per the markdownlint MD001 rule, heading levels should increment by one. The document jumps from # Remove workspace member (h1) directly to ### Path parameters (h3), skipping h2.

Consider wrapping the parameters sections under an h2 heading for proper document structure:

Proposed fix
 <div class="params-section">
 
+## Parameters
+
 ### Path parameters
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div class="params-section">
### Path parameters
<div class="params-list">
<ApiParam name="slug" type="string" :required="true">
The unique identifier (slug) for the workspace.
</ApiParam>
</div>
<div class="params-section">
## Parameters
### Path parameters
<div class="params-list">
<ApiParam name="slug" type="string" :required="true">
The unique identifier (slug) for the workspace.
</ApiParam>
</div>
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 21-21: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/api-reference/members/remove-workspace-member.md` around lines 19 - 31,
The document skips from h1 to h3 causing an MD001 lint violation; change the
"### Path parameters" heading to an h2 ("## Path parameters") and similarly
promote any sibling sections under the <div class="params-section"> (e.g., other
"###" headings) to h2 so headings increment by one; ensure the ApiParam block
remains unchanged and that the new h2 wraps the <div class="params-section">
content to restore proper heading hierarchy.

</div>

<div class="params-section">

### Body Parameters

<div class="params-list">

<ApiParam name="email" type="string" :required="true">

Email address of the member to remove.

</ApiParam>

<ApiParam name="remove_seat" type="boolean" :required="false">

Reduce purchased seat count by 1. Defaults to `false`.

</ApiParam>

</div>
</div>

<div class="params-section">

### Scopes

`write` or `workspaces:members:write`

</div>

<div class="params-section">

### Responses

| Status | Description |
| ------ | -------------------------------------- |
| 204 | Member removed successfully (no body) |
| 400 | Validation error (see below) |
| 403 | You are not a member of this workspace |
| 404 | Workspace or member not found |

**400 Validation Errors:**

- `email` field is required.
- Cannot remove yourself. You'll need leave the workspace from the application.
- Cannot remove a member with a higher role than yours.
- Member is the sole admin of one or more projects — promote another admin first.

</div>

<div class="params-section">

### What happens

- Member is deactivated in all projects.
- Member is removed from all teamspaces and shared pages
- If `remove_seat` is `true` and unused seats exist, one seat is removed from your plan.
</div>

</div>
<div class="api-right">

<CodePanel title="Remove workspace member" :languages="['cURL', 'Python', 'JavaScript']">
<template #curl>

```bash
curl -X POST \
"https://api.plane.so/api/v1/workspaces/my-workspace/members/remove/" \
-H "X-API-Key: $PLANE_API_KEY" \
# Or use -H "Authorization: Bearer $PLANE_OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "jane@example.com",
"remove_seat": true
}'
Comment on lines +99 to +107
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

The cURL example breaks when copied into a shell.

The inline # Or use ... comment comes after a line continuation, so the shell treats the rest of the command as commented out. Move the auth alternative outside the continued command or split it into a separate snippet.

Suggested fix
 curl -X POST \
   "https://api.plane.so/api/v1/workspaces/my-workspace/members/remove/" \
   -H "X-API-Key: $PLANE_API_KEY" \
-  # Or use -H "Authorization: Bearer $PLANE_OAUTH_TOKEN" \
   -H "Content-Type: application/json" \
   -d '{
   "email": "jane@example.com",
   "remove_seat": true
 }'
+
+# Or replace the API key header with:
+# -H "Authorization: Bearer $PLANE_OAUTH_TOKEN"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/api-reference/members/remove-workspace-member.md` around lines 99 - 107,
The cURL example in the remove-workspace-member snippet contains an inline shell
comment after a backslash which breaks copy-paste; update the example so the
auth alternative (-H "Authorization: Bearer $PLANE_OAUTH_TOKEN") is not placed
on a continued line—either move that comment to its own separate code
block/snippet or place it on its own non-continued line above/below the curl
command so the backslashes and continuations remain valid when pasted.

```

</template>
<template #python>

```python
import requests

response = requests.post(
"https://api.plane.so/api/v1/workspaces/my-workspace/members/remove/",
headers={"X-API-Key": "your-api-key"},
json={
"email": "jane@example.com",
"remove_seat": True
}
)
print(response.status_code) # 204 on success
```

</template>
<template #javascript>

```javascript
const response = await fetch("https://api.plane.so/api/v1/workspaces/my-workspace/members/remove/", {
method: "POST",
headers: {
"X-API-Key": "your-api-key",
"Content-Type": "application/json",
},
body: JSON.stringify({
email: "jane@example.com",
remove_seat: true,
}),
});
console.log(response.status); // 204 on success
```

</template>
</CodePanel>

<ResponsePanel status="204">

```json
No Content
```
Comment on lines +148 to +152
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Don’t present a 204 response as JSON.

No Content inside a json fence implies the endpoint returns a JSON payload, but a 204 response has no body. Use plain text such as “No response body” or leave the panel empty if the component supports it. As per coding guidelines, docs/api-reference/**/*.md: Use <ResponsePanel> component for syntax-highlighted API response JSON examples.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/api-reference/members/remove-workspace-member.md` around lines 148 -
152, The ResponsePanel for the 204 response currently contains a JSON code fence
with "No Content", which implies a payload; update the <ResponsePanel
status="204"> usage to not include a JSON block—either leave the panel empty or
replace the fenced JSON with plain text like "No response body" (no JSON
formatting). Ensure you only use <ResponsePanel> JSON examples for responses
that actually return a body; keep the change scoped to the ResponsePanel with
status="204".


</ResponsePanel>

</div>
</div>
Loading