/Docs
Search docs or ask a question⌘K
DocsAgent
Changelog
API Reference Remove Member

Remove Member

Remove a member from a workspace, or leave it yourself.

DELETE/v1/orgs/{orgId}/members/{memberId}Try it
Session token

Removes a member from a workspace. Pass your own membership id to leave the workspace.

Note

An admin or member can remove themselves (leave) while the workspace has other members. The owner can't leave, and neither can the only member. Removing someone else requires the admin or owner role — a member gets 403 forbidden with details.requiredRole: "admin". Requires a session JWT; API keys are rejected with 401. Any plan.

Rules that depend on who is being removed:

•
An owner can't be removed by someone else (400). They are demoted first with Update Member Role or lose ownership in a transfer.
•
An owner can't leave (403 owner_cannot_leave), even when the workspace has another owner. To step away, transfer ownership — you become an admin and can then leave — or delete the workspace or your account.
•
The only member of a workspace can't leave (409 sole_member). Delete the workspace or your account instead. Two members leaving at the same moment are handled one after the other, so a workspace is never left with nobody in it.

Path Parameters

NameDescription
orgId:stringpathRequired
The organization ID.
memberId:stringpathRequired
The membership id from List Members.

Response — 200 OK

NameDescription
left:booleanbody
true when you removed yourself. Recorded in the audit log as org.member.left; removing someone else is org.member.removed.

Error Responses

400 Bad Request

bad_request ("Cannot remove the owner") — you tried to remove another member who is an owner.

401 Unauthorized

unauthorized for a missing, invalid or expired token (or an API key); session_revoked when the session has been signed out.

403 Forbidden

owner_cannot_leave — you are an owner and tried to leave:

json
{
"error": {
"code": "owner_cannot_leave",
"message": "The workspace owner cannot leave. Transfer ownership to another member first, or delete the workspace or your account.",
"details": { "traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10" }
}
}

forbidden — a member tried to remove someone else:

json
{
"error": {
"code": "forbidden",
"message": "Only workspace admins can remove members.",
"details": { "requiredRole": "admin", "currentRole": "member", "traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10" }
}
}

Without role details, the 403 means you don't belong to the workspace.

404 Not Found

not_found — the workspace doesn't exist or is deleted, or memberId is not a member of this workspace ("Member not found").

409 Conflict

sole_member — you are the only member and tried to leave:

json
{
"error": {
"code": "sole_member",
"message": "You are the only member of this workspace, so you cannot leave it. Delete the workspace or your account instead.",
"details": { "traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10" }
}
}
Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl -X DELETE https://api.syntext.dev/v1/orgs/3f9c2a1e-6b4d-4e8a-a1c7-5d2e9f0b7c13/members/a2c4e6f8-1b3d-4f5a-8c7e-9d0b2f4a6c81 \
-H "Authorization: Bearer $SYNTEXT_JWT"
Responseapplication/json
200OK
{
"data": {
"id": "a2c4e6f8-1b3d-4f5a-8c7e-9d0b2f4a6c81",
"removed": true,
"left": false
}
}
Product
Resources
Company
© 2026 SyntextBuilt with Syntext